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

1 次查看(过去 30 天)
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

回答(1 个)

Steven Lord
Steven Lord 2016-9-23
The seed is basically the initial condition for the pseudorandom number generator used to generate the random numbers.
  3 个评论
Steven Lord
Steven Lord 2016-9-23
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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Random Number Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by