How to draw random number from a Cauchy Distribution
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Atinesh Singh
am 17 Apr. 2017
Beantwortet: Roger Stafford
am 17 Apr. 2017
I know random number can be drawn from a Normal Distribution as follows
normrnd(mu, sd)
where mu=mean and sd=standard deviation
But how can we draw a random number from Cauchy Distribution with given mu (location parameter) and sigma (scale parameter) as there is no built-in function available. For more information about Cauchy Distribution see this
0 Kommentare
Akzeptierte Antwort
Roger Stafford
am 17 Apr. 2017
To generate N random values of x with a Cauchy distribution where b is the half width at the half maximum density level and m is the statistical median:
x = m+b*tan(pi*(rand(N,1)-1/2));
See
http://mathworld.wolfram.com/CauchyDistribution.html
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!