フィルターのクリア

genarate random integers from normal distribution

12 ビュー (過去 30 日間)
joy
joy 2014 年 6 月 8 日
編集済み: John D'Errico 2014 年 6 月 8 日
Hi,
I want to generate a set of 50 random variable having std_deviation 0.1 and mean 0.5 from a normal distribution...it can be float
but I want to generate 50 random integers with std_deviation 3500 and mean 4000..
how to do the both with
randn?
any idea, pls share..thanks
regrads

回答 (1 件)

John D'Errico
John D'Errico 2014 年 6 月 8 日
編集済み: John D'Errico 2014 年 6 月 8 日
help randn
will tell you how to generate a set with a given mean and variance. Why not read the help? Or take a basic class in probability & statistics.
As for integers, you cannot do so. A normal distribution is CONTINUOUS. That says your question has no meaning in mathematics.
You can generate integers that are APPROXIMATELY normally distributed. Round will do that for you here.

カテゴリ

Help Center および File ExchangeRandom Number Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by