randn

9 ビュー (過去 30 日間)
PChoppala
PChoppala 2011 年 11 月 11 日
Hi I have an 20X20 image and I want to distribute 'N' random numbers inside the frame.
How can I use randn for that?
I can use unifrnd(1,20,1,N), but how to use randn?
Thanks

採用された回答

Walter Roberson
Walter Roberson 2011 年 11 月 11 日
You cannot do that. randn() is the random number generator for the normal distribution. The normal distribution must have infinite tails on both sides, so it is not possible to confine it to any particular range (not and keep it normally distributed.)
You could use a beta distribution to give specific limits, but not a normal distribution.

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by