Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

How can I generate random numbers given its probability distribution function.

Asked by Arnav Mohan on 19 Jul 2013

How can I generate random numbers given its probability distribution function. I have my cdf as (Fx - Fx^n/n)*(n/(n-1)) where Fx is the cdf of an exponential RV.

0 Comments

Arnav Mohan

Products

No products are associated with this question.

1 Answer

Answer by Sean de Wolski on 19 Jul 2013

slicesample in the Statistics Toolbox will do this:

doc slicesample

0 Comments

Sean de Wolski

Contact us