how to generate random number from a given Normal distribution

44 ビュー (過去 30 日間)
Benjamin
Benjamin 2019 年 9 月 19 日
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,
  2 件のコメント
Benjamin
Benjamin 2019 年 9 月 19 日
I think I found the command. :)
José Osvaldo Ferreira Filho
José Osvaldo Ferreira Filho 2022 年 6 月 21 日
Thank you!

サインインしてコメントする。

採用された回答

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by