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
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 についてさらに検索

質問済み:

2011 年 3 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by