Generating random number for the Inverse Gaussian distribution
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Abas Arkawazi
am 22 Nov. 2019
Kommentiert: Abas Arkawazi
am 23 Nov. 2019
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 Kommentare
Akzeptierte Antwort
the cyclist
am 22 Nov. 2019
Bearbeitet: the cyclist
am 22 Nov. 2019
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);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Random Number Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!