Generate Random numbers from a 2 D probability density function

12 ビュー (過去 30 日間)
CRIS
CRIS 2017 年 10 月 3 日
回答済み: Image Analyst 2017 年 10 月 3 日
i have the follow pdf : f(B,S); how can i generate random values for B and S that follow this distribution?? can someone help me??

回答 (2 件)

Sky Sartorius
Sky Sartorius 2017 年 10 月 3 日
Conceptually, you can generate random numbers for any arbitrary distributions by
  1. Converting the pdf to a cdf.
  2. Generating uniform random numbers (from 0 to 1) using rand
  3. Mapping the uniform random numbers to the cdf.
There are many functions available on the file exchange that will do this for you.

Image Analyst
Image Analyst 2017 年 10 月 3 日

製品

Community Treasure Hunt

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

Start Hunting!

Translated by