Page 1 of 1

You may not reset the legacy stream using a seed

Posted: Sat Jun 17, 2017 6:40 am
by matlab1
You may not reset the legacy stream using a seed

Re: You may not reset the legacy stream using a seed

Posted: Mon Jan 11, 2021 4:40 am
by matlab1
reset(s)

resets the generator for the random stream s to the initial internal state corresponding to its seed. This is similar to clearing s and recreating it using RandStream, except that reset does not set the stream's NormalTransform, Antithetic, and FullPrecision properties to their original values.

https://www.mathworks.com/help/matlab/ref/randstream.reset.html



Examples

Reset Stream to Its Initial State

Reset a random number stream to its initial state. This does not create a random number stream, it simply resets the stream.

Code: Select all

stream = RandStream('mt19937ar','Seed',0)
reset(stream);



Reset Stream Using Specific Seed

Reset a random number stream using a specific seed.

Code: Select all

stream = RandStream('mt19937ar','Seed',0)