State property
Class: qrandstream
Current state of the stream
Description
The State
property of a quasi-random stream
contains the index into the associated point set of the next point
to draw in the stream. Getting and resetting the State
property
allows you to return a stream to a previous state. The initial value
of State
is 1
.
Examples
Q = qrandstream('sobol', 5); s = Q.State; u1 = qrand(Q, 10) Q.State = s; u2 = qrand(Q, 10) % contains exactly the same values as u1