tallrng
Control random number generation for tall arrays
Syntax
Description
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)
.
Examples
Input Arguments
Output Arguments
Tips
If you have Statistics and Machine Learning Toolbox™, then
tallrng
controls the random numbers that functions such asdatasample
,cvpartition
, andTreeBagger
generate during tall array calculations.