How to generate samples for cauchy distribution

12 Ansichten (letzte 30 Tage)
Mudit Batra
Mudit Batra am 7 Mär. 2020
Beantwortet: David Goodmanson am 7 Mär. 2020
How to generate samples for cauchy distribution with mean 0 and variance 1.88?
Cauchy(0,1.88)

Antworten (1)

David Goodmanson
David Goodmanson am 7 Mär. 2020
Hi Mudit,
the Cauchy distribtiion doesn't have a variance, since it doesn't have moments. But it does have a scale factor b. For mean 'a' and scale factor b,
N = 10000;
x = a+b*tan(pi*(rand(1,N)-1/2))

Community Treasure Hunt

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

Start Hunting!

Translated by