What is the code?
Ältere Kommentare anzeigen
I want to generate random numbers. But i want it like this. for example i want to generate random numbers for The gamma distribution coefficient of skewness 2.
How can i do this?
Akzeptierte Antwort
Weitere Antworten (1)
Jonathan Sullivan
am 6 Dez. 2012
skewness is simple 2 divided by the square root of the shape parameter for gamma distributions. Here's an example.
skewness = 2;
scale = 1;
shape = 2./sqrt(skewness);
gamrnd(shape,scale)
9 Kommentare
eren eren
am 7 Dez. 2012
eren eren
am 7 Dez. 2012
José-Luis
am 8 Dez. 2012
It is not working how?
eren eren
am 8 Dez. 2012
Since it's a random sample, it might not be exactly equal to 2. Also, there might be some bias. "The code not working" is not a very useful statement for those that are trying to help you. An example showing what you get/what you expect would be more helpful.
eren eren
am 12 Dez. 2012
eren eren
am 13 Dez. 2012
José-Luis
am 13 Dez. 2012
Please see the comment to my original answer.
Kategorien
Mehr zu Gamma Distribution finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!