Pseudo Noise Sequence
Show older comments
How to generate a PN sequence using an independent seed for different value of a variable.
Answers (2)
Fangjun Jiang
on 22 Nov 2011
rand()?
for k=1:3
rand('seed',k);
a=rand(1,5)
end
The generated random numbers will be repeatable.
Daniel Shub
on 22 Nov 2011
0 votes
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/
Categories
Find more on Creating and Concatenating Matrices 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!