Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

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

See Also

Was this topic helpful?