Control random number generation for tall arrays
tallrng('default')
puts the settings of the random number
generator used in tall array calculations to their default values. The random
numbers produced are the same as if you restart MATLAB®.
tallrng('shuffle')
sets the seed of the random number
generator based on the current time. Use this syntax when you want different
sequences of random numbers each time they are generated.
tallrng(
sets the starting point,
or seed, of the random number generator. Use this syntax when you want to produce
predictable sequences of numbers.seed
)
returns the current
state of the random number generator as a structure. Use the structure to restore
the random number generator to the captured state at a later time with
state
= tallrngtallrng(state)
.
If you have Statistics and Machine Learning Toolbox™, then tallrng
controls the random numbers
that functions such as datasample
,
cvpartition
, and TreeBagger
generate
during tall array calculations.