Generate random number from inverse gamma distribution

15 ビュー (過去 30 日間)
khatereh 2012 年 5 月 27 日
コメント済み: Kasi Vemalaiah 2021 年 3 月 8 日
Hi, I want to get the sample from the inverse gamma distribution with two parameter a and b and I am wondering how I can do that in matlab? Please help me ! Thanks

回答 (1 件)

Tom Lane
Tom Lane 2012 年 5 月 27 日
If I understand the inverse gamma correctly, you can generate from x=gamrnd(a,1./b) and then take y=1./x. This would require the Statistics Toolbox.
  3 件のコメント
Kasi Vemalaiah
Kasi Vemalaiah 2021 年 3 月 8 日
Thank you.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by