Set global random number stream
prevstream = RandStream.setGlobalStream(stream)
prevstream = RandStream.setGlobalStream(stream) designates
the random number stream, specified as
to be the global stream that the
draw values from. It returns the previous global random number stream
rely on the same stream of uniform pseudorandom numbers, known as
the global stream.
one value from that stream to generate each uniform value it returns.
randi draws one uniform value from that
stream to generate each integer value it returns. And
randn draws one or more uniform values
to generate each normal value it returns. Note that there are also
for which you specify a specific random stream from which to draw
rng function is a
shorter alternative for many common uses of