MATLAB Answers

0

how to generate random number from a given Normal distribution

Asked by Benjamin on 19 Sep 2019
Latest activity Answered by Star Strider
on 19 Sep 2019
Hello
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,

  1 Comment

Sign in to comment.

1 Answer

Answer by Star Strider
on 19 Sep 2019
 Accepted Answer

There are several options. One is the core MATLAB function randn. The Statistics and Machine Learning Toolbox has the normrnd funciton, and others.

  0 Comments

Sign in to comment.