edited-making value 0
Show older comments
In my previous posts the answer is correct,but every time i run i get different answer,randperm is used,but i dont want to values to e b echanged wen i run different times,please help
Accepted Answer
More Answers (1)
Andreas Goser
on 2 Feb 2012
0 votes
So you want to have random number, but always the same set of random numbers? Check out RandStream.
2 Comments
kash
on 2 Feb 2012
Bjorn Gustavsson
on 2 Feb 2012
Kash, you answer before checking RandStream. That way you happen to give a comment that make you appear "less intelligent than you'd want to". Check out the documentation of RandStream, then answer.
HTH
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!