edited-making value 0
显示 更早的评论
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
采纳的回答
更多回答(1 个)
Andreas Goser
2012-2-2
0 个投票
So you want to have random number, but always the same set of random numbers? Check out RandStream.
2 个评论
kash
2012-2-2
Bjorn Gustavsson
2012-2-2
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
类别
在 帮助中心 和 File Exchange 中查找有关 Random Number Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!