필터 지우기
필터 지우기

sampling from a distribution.

조회 수: 21 (최근 30일)
sepideh
sepideh 2013년 7월 12일
I want to get random samples from a mixture distribution for monte carlo approach. What are some matlab function that can be used?

답변 (1개)

Image Analyst
Image Analyst 2013년 7월 12일
I don't know what distributions you want, but you might try the rand() function. Or if you want a specific distribution, you might try RANDRAW: http://www.mathworks.com/matlabcentral/fileexchange/7309-randraw which has about 50 of them.
  댓글 수: 2
sepideh
sepideh 2013년 7월 13일
Thanks, The distribution is a mixture of gamma and generalized normal distribution in which case i need a function that gets my distribution from an m file and randomly selects from it.
Image Analyst
Image Analyst 2013년 7월 13일
In general you need to construct the CDF of your PDF and then put in a random number to get your random draw. See this for more info: http://en.wikipedia.org/wiki/Inverse_transform_sampling

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by