help-octave
[Top][All Lists]
Advanced

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

Re: Same sequence of random number generators than under Matlab?


From: ahowe42
Subject: Re: Same sequence of random number generators than under Matlab?
Date: Sun, 3 Jun 2012 09:28:03 -0700 (PDT)

I'm not sure if it will work, but your best best (if the randoms are reals)
is to try setting the state to a certain value in both applications
(rand('state',42) or randn('state',42)).  I'm not familiar with the seed
algorithm the apps use, but even with the same starting state, and with both
running on the same machine, the results could be different.  If, however,
they are running on different machines, I'm sure they will not be identical.

If, however, the randoms are integers, perhaps you can generate a very large
sequence in both and have the results be sufficiently similar.

Andrew

--
View this message in context: 
http://octave.1599824.n4.nabble.com/Same-sequence-of-random-number-generators-than-under-Matlab-tp4630461p4630467.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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