vendredi 22 mai 2015

Seed MATLAB `idinput`

The generation of two PRBS signals using the idinput function of the System Identification toolbox in MATLAB results in two times the same sequence. How can I randomize the second sequence with respect to the first? Can I set a seed or something?

u1 = idinput(N,'prbs');
u2 = idinput(N,'prbs');

all(u1==u2) % Returns 1

I have tried to seed the MATLAB rng

rng(12345)

Or set the GlobalStream

s = RandStream('mcg16807','Seed',1234)
RandStream.setGlobalStream(s)

Which was of no effect.




Aucun commentaire:

Enregistrer un commentaire