DSPRelated.com
Forums

Re: Random numbers

Started by Unknown October 3, 2001
hi,
for normally distributed numbers with a standard deviation of 100 and a
mean of 0 use

a = 100*randn(20,1);

for evenly distributed numbers between -100 and 100, use

a = 200*(rand(20,1)-0.5) ;

At 21:54 3/10/2001 +0100, ik wrote:
>I am trying to generate some random values ( say 20)in the range
>say [-100 100]. What code do i use? Thanks. Mike >
>_____________________________________
>Note: If you do a simple "reply" with your email client, only the author
>of this message will receive your answer. You need to do a "reply all" if
>you want your answer to be distributed to the entire group.
>
>_____________________________________
>About this discussion group:
>
>To Join:
>
>To Post:
>
>To Leave:
>
>Archives: http://www.yahoogroups.com/group/matlab
>
>More DSP-Related Groups: http://www.dsprelated.com/groups.php3
>
>">http://docs.yahoo.com/info/terms/