[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rand('state',0)

From: Paul Kienzle
Subject: Re: rand('state',0)
Date: Thu, 13 Oct 2005 22:00:21 -0400

On Oct 13, 2005, at 4:10 PM, Quentin Spencer wrote:

Steve C. Thompson wrote:

I'm collaborating with MATLAB users and they have
rand('state',0) in their code. According to <>
this is used in MATLAB to ``set rand to its default initial
state''.  This command produces an error in Octave, however:

 octave:1> rand('state',0)
 error: rand: unrecognized string argument

What version of octave are you using? I don't get this error with 2.9.3. I haven't tried 2.1.71.

The 'state' parameter is an octave-forge extension, for compatibility and for allowing me to completely save and restore the state of the mersenne twister RNG.

- Paul

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]