⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gaminvrnd.m

📁 Continuous Profile Models (CPM) Matlab Toolbox.
💻 M
字号:
% function x = gaminvrnd(A,B)%% Generate random samples from an inverse-gamma distribution, using% Rubin notation.%% B_matlab = 1/B_rubin%% See also gamrnd, gamcdf, gamfit, gaminv, gamlike, gampdf, gamstat, random.function x = gaminvrnd(A,B,M,N)if exist('M','var')    y = mygamrnd(A,B,M,N);else    y = mygamrnd(A,B); end%% make it draw from the inversex = 1./y; return;%%%%%A=1.5; B=0.5;if A>1    temp = gaminvrnd(A,B,1e6,1);    mean(temp)    B./(A-1)endtemp=mygamrnd(A,B,1e6,1);mean(temp)A/B

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -