Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
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

Respuestas (1)

Steven Lord
Steven Lord el 23 de Sept. de 2016
The seed is basically the initial condition for the pseudorandom number generator used to generate the random numbers.
  3 comentarios
Steven Lord
Steven Lord el 23 de Sept. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Random Number Generation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by