Difference between Matlab and Octave in random seeding
dbateman
dbateman at free.fr
Sat Mar 1 14:54:42 CST 2008
John W. Eaton wrote:
>
> On 15-Feb-2008, Mark van Rossum wrote:
>
> | In octave (3.0.0)
> | rand ('state', 1); randn
> | will always produce the same number. I.e. the seed on rand affects randn
> as
> | well.
> |
> | In Matlab seeding rand does not seed randn.
>
> Please try the following patch.
>
> Thanks,
>
> jwe
>
I asked at the time that the Mersenne twister code was included in Octave
whether we wanted independent generator states per generator or not, and if
I remember correctly it didn't seem important. Note also that there are a
number of additional random generator functions that are derived from the
base generator in the statistics package, and so the state of these
generators will depend on the underlying generator functions. I don't have
access to matlab and so can't check, but how do things like exprnd depend on
the state of the rand and randn generators in Matlab? I suspect that they
rely on the same underlying generators. However as Octave has a ziggurat
implementation of rande that is also used for exprnd, then this change will
mean that Octave is now different than Matlab in a different manner. Should
we care as this will only affect the users of the matlab statistics
toolbox..
D.
--
View this message in context: http://www.nabble.com/Difference-between-Matlab-and-Octave-in-random-seeding-tp15508096p15780747.html
Sent from the Octave - Bugs mailing list archive at Nabble.com.
More information about the Bug-octave
mailing list