What is the code?
古いコメントを表示
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?
採用された回答
その他の回答 (1 件)
Jonathan Sullivan
2012 年 12 月 6 日
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 件のコメント
eren eren
2012 年 12 月 7 日
eren eren
2012 年 12 月 7 日
José-Luis
2012 年 12 月 8 日
It is not working how?
eren eren
2012 年 12 月 8 日
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
2012 年 12 月 12 日
eren eren
2012 年 12 月 13 日
José-Luis
2012 年 12 月 13 日
Please see the comment to my original answer.
カテゴリ
ヘルプ センター および File Exchange で Gamma Distribution についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!