You may not reset the legacy stream using a seed

Post Reply
matlab1
Site Admin
Posts: 4797
Joined: Thu Dec 15, 2016 9:30 am
Contact:

You may not reset the legacy stream using a seed

Post by matlab1 »

You may not reset the legacy stream using a seed
matlab1
Site Admin
Posts: 4797
Joined: Thu Dec 15, 2016 9:30 am
Contact:

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

Post 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)
Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests