Seeds the random number generator using the given integer seeds.
Changing the seed allows you to choose which pseudo-random
sequence is generated. The seed takes two uint32
values:
seed(s,t)
where s
and t
are the seed values.
Here's an example of how the seed value can be used to reproduce a specific random number sequence.
--> seed(32,41); --> rand(1,5) ans = <double> - size: [1 5] Columns 1 to 2 0.858889267293040 0.372711154975280 Columns 3 to 4 0.555128777998597 0.955656548991768 Columns 5 to 5 0.736669598011224 --> seed(32,41); --> rand(1,5) ans = <double> - size: [1 5] Columns 1 to 2 0.858889267293040 0.372711154975280 Columns 3 to 4 0.555128777998597 0.955656548991768 Columns 5 to 5 0.736669598011224