Quantcast
Channel: MATLAB Central Newsreader - tag:"homework"
Viewing all articles
Browse latest Browse all 36

Re: generating random numbers with certain pdf

$
0
0
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <4c588db9-013c-4a85-b45a-10ea164467c8@k30g2000vbn.googlegroups.com>...
> You have to invert the function. Integrate your function analytically
> (if possible) so that it gives the CDF (y) as a function of your input
> (x). Then try to invert it analytically so that you get x as an
> output once you put in the CDF value (the y value) as an input.
> *This* is the function you want to send your rand() array into.

Now what can I do if the CDF cannot be integrated analytically? i.e. PDF:
f(x)=exp((cos(x)-A)^2 + Bsin^2 (x))

Viewing all articles
Browse latest Browse all 36

Latest Images

Trending Articles



Latest Images