Filter löschen
Filter löschen

Could someone please explain to serving the "Seed" variable that appears in the input mask Random Number?

1 Ansicht (letzte 30 Tage)
Good morning,
Could someone please explain to serving the "Seed" variable that appears in the input mask Random Number?Matlab help does not clear me.
Thank you very much

Antworten (1)

Steven Lord
Steven Lord am 23 Sep. 2016
The seed is basically the initial condition for the pseudorandom number generator used to generate the random numbers.
  3 Kommentare
Steven Lord
Steven Lord am 23 Sep. 2016
No, the seed is not the first value returned by the generator. Let me try to explain with a concrete example. Let's say I have the list of numbers below (written in the format "index - value".) If I want to step through this list of numbers to generate a sequence (wrapping around when I reach the end of the list), the specific sequence I generate depends on where I start.
1 - 17
2 - 35
3 - 9
4 - 88
5 - 1
If my initial seed is 1 (so I start with index 1) the sequence I generate is:
17, 35, 9, 88, 1, 17, 35, ...
If my initial seed is 2 (so I start with index 2) the sequence I generate is:
35, 9, 88, 1, 17, 35, 9, 88, ...
That's not exactly how the random number generator seeds work for all the generators but hopefully the analogy illustrates the general idea. You can think of the seed as initialization data.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Random Number Generation finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by