help-octave
[Top][All Lists]
Advanced

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

Generate same rand sequence in Octave, Matlab


From: Steve Thompson
Subject: Generate same rand sequence in Octave, Matlab
Date: Thu, 8 Dec 2011 11:39:14 -0800

Hi list,

I'm trying to figure out if it is possible to get the same rand (and randn) sequence in Matlab (2007) and Octave.

In Matlab (7.4.0.287 (R2007a)) I get:
>> rand('state', 0)
>> rand
ans = 0.9501

In Octave (3.2.4) I get:
octave:1> rand('state', 0)
octave:2> rand
ans =  0.84442

It is possible to get the same sequence?

Thanks!

Steve


reply via email to

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