generate random number according a pdf
이전 댓글 표시
Hi, if I have a function f(x) that is a pdf, how can I generate random number according to the odf f(x)? This distribution probability is not know (is not gaussian, exponentially, exc...) but it is my own distribution.
Thanks, Chiara
댓글 수: 1
Ashish Uthama
2011년 3월 29일
Have a look at http://en.wikipedia.org/wiki/Random_number_generation#Generation_from_a_probability_distribution and give the implementation a try. Post back here if you have trouble.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!