MATLAB Answers

how to generate random number from a given Normal distribution

69 views (last 30 days)
Benjamin on 19 Sep 2019
Answered: Star Strider on 19 Sep 2019
I need to generate random numbers (e.g. n = 100) from a parameter, x, with a Normal distribution that the Mean and Standard Deviation is also given (and do a Monte Carlo simulation by hand). Is there any command in Matlab that by giving the X = Normal (M, S.D.) it generates n numbers from that distribution?
Thank you,

Accepted Answer

Star Strider
Star Strider on 19 Sep 2019
There are several options. One is the core MATLAB function randn. The Statistics and Machine Learning Toolbox has the normrnd funciton, and others.


Sign in to comment.

More Answers (0)

Translated by