How many different seed is possible for rng()?
9 ビュー (過去 30 日間)
古いコメントを表示
I cannot find in the description, that what is the maximum value of a seed which differs from another. And can it be zero, negative or noninteger?
0 件のコメント
回答 (1 件)
Walter Roberson
2018 年 3 月 9 日
編集済み: Walter Roberson
2018 年 3 月 9 日
"rng(seed) seeds the random number generator using the nonnegative integer seed [...]"
So the minimum difference is 1, and they cannot be negative, or non-integer, but they can be zero.
rng() passes the seed to RandStream, https://www.mathworks.com/help/matlab/ref/randstream.randstream.html
"Seed: Nonnegative scalar integer with which to initialize all streams. Seeds must be an integer between 0 and 2^32 − 1 or 'shuffle' to create a seed based on the current time. Default is 0."
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Random Number Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!