Generating random number for the Inverse Gaussian distribution
9 次查看(过去 30 天)
显示 更早的评论
what is the code for generating random number for the inverse Gaussian distribution?
Please post here if anyone known of a good method of doing this.
0 个评论
采纳的回答
the cyclist
2019-11-22
编辑:the cyclist
2019-11-22
If you have the Statistics and Machine Learning Toolbox, then you can generate N random numbers with
N = 1000; % Set this to the number of values you want
mu = 1; % Set the scale parameter
lambda = 1; % Set the shape parameter
r = random('InverseGaussian',mu,lambda,N,1);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Random Number Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!