mygamrnd.m
来自「Continuous Profile Models (CPM) Matlab T」· M 代码 · 共 25 行
M
25 行
% function x = mygamrnd(A,B,M,N)%% Generate random samples from a gamma distribution% using Rubin notation%% Matlab parameterization relates to Rubin notation as follows:% uses b_matlab = 1/B_rubin%% Expectation(gaminvrnd) = B/(A-1)% % See also gaminvrnd gamrnd, gamcdf, gamfit, gaminv, gamlike, gampdf, gamstat, random.function y = mygamrnd(A,B,M,N)%% to make it match Rubin book and standard notationB=1/B;if exist('M','var') y = gamrnd(A,B,M,N);else y = gamrnd(A,B); %expectation(y)=A*Bendreturn;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?