genarate random integers from normal distribution
12 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
John D'Errico
on 8 Jun 2014
Edited: John D'Errico
on 8 Jun 2014
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.
0 Comments
See Also
Categories
Find more on Random Number Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!