Pseudo Noise Sequence
16 次查看(过去 30 天)
显示 更早的评论
How to generate a PN sequence using an independent seed for different value of a variable.
0 个评论
回答(2 个)
Fangjun Jiang
2011-11-22
rand()?
for k=1:3
rand('seed',k);
a=rand(1,5)
end
The generated random numbers will be repeatable.
0 个评论
Daniel Shub
2011-11-22
Not sure what you are really asking. There have been a number of different ways of seeding the random number generator(s). This might be a useful starting place: http://blogs.mathworks.com/loren/2008/11/05/new-ways-with-random-numbers-part-i/
[EDIT] This link might be better: http://blogs.mathworks.com/loren/2011/07/07/simpler-control-of-random-number-generation-in-matlab/
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!