rng_restore

Restore the Matlab default (global) random number generator state

Syntax

   rng_restore(state)

Arguments

input

   state      previous rng state

Description

Restore the Matlab default (global) random number generator state from state. If state == 0 it is ignored. See rng_seed, rng_save.

Example

   state = rng_seed(seed);
   X = rand(10,3);
   rng_restore(state);

See also

rng | rng_seed | rng_save