Generating random variable from inverse gaussian dist.

2 ビュー (過去 30 日間)
elif unal
elif unal 2021 年 10 月 20 日
回答済み: Jeff Miller 2021 年 10 月 20 日
Hi. I want to generate random variable from inverse gaussian dist with accepted-rejection method but I didnt do it. help me please..

回答 (1 件)

Jeff Miller
Jeff Miller 2021 年 10 月 20 日
Do you really need to write the random generator yourself? This one is already available:
>> pd = makedist('inversegaussian')
%pd =
% InverseGaussianDistribution
%
% Inverse Gaussian distribution
% mu = 1
% lambda = 1
>> pd.random(1,10)
% ans =
% 0.82544 0.35561 0.46273 6.1449 2.5297 0.22435 0.20619 2.594 0.2875 0.89231

カテゴリ

Help Center および File ExchangeRandom Number Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by