MATLAB Examples

Random Integer Generator Initial Seed Source

Demonstrate that the Random Integer Generator sequences output when the initial seed source is Auto are different and that when the initial seed source is Parameter the sequences are repeatable when the seed in not changed.

Run the slex_rng_seed_source model twice and compare the output sequence.

     6     1
     7     7
     1     7
     7     3
     5     6
     0     1
     2     3
     4     7
     7     6
     7     7

Change the Initial seed source to Parameter. Run the slex_rng_seed_source model twice with the seed value set to 0 and compare the output sequence.

     6     6
     7     7
     1     1
     7     7
     5     5
     0     0
     2     2
     4     4
     7     7
     7     7

Change seed value to 1993, rerun, and compare sequence to the previous sequences.

     6     6     0
     7     7     1
     1     1     7
     7     7     2
     5     5     1
     0     0     1
     2     2     4
     4     4     5
     7     7     4
     7     7     1