find a command that will generate a pseudo-random number(random number) that lies bwtween -1 and 1 drawn from uniform distribution
1 view (last 30 days)
Show older comments
Hi I am trying to find a command that will generate a pseudo-random number(random number) that lies between -1 and 1 drawn from uniform distribution.
0 Comments
Accepted Answer
Guillaume
on 22 Jan 2015
n = 2 * rand(1, 1000) - 1; %generate 1000 numbers between -1 and 1
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!