Reply by siva prasad motamarri October 4, 20012001-10-04
hi,

u can use 'rand' function in Matlab which gives the uniform random in
the range (0,1).
if u want Random numbers in (-1,1) use
2*rand(1,20)-1
so for (-100,100)
100*(2*rand(1,20)-1);

hope it will helps u.
if u aren't intrested to use 'rand' function mail me to know how to
generate them.

siva prasad motamarri You 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:  m...@yahoogroups.com

To Post:  m...@yahoogroups.com

To Leave: m...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/matlab

More DSP-Related Groups: http://www.dsprelated.com/groups.php3


">Yahoo! Terms of Service.