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!