Could someone please explain to serving the "Seed" variable that appears in the input mask Random Number?
조회 수: 4 (최근 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
댓글 수: 0
답변 (1개)
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
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 Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!