Difference between Matlab and Octave in random seeding
John W. Eaton
jwe at bevo.che.wisc.edu
Mon Mar 3 01:55:14 CST 2008
On 1-Mar-2008, dbateman wrote:
| 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..
OK, I don't know what is best here. Would someone (not David) please
check the Matlab behavior of exprnd, rand, and randn when setting the
state? If you set the state for rand or randn, is the exprnd sequence
also reinitialized, or is it independent?
Thanks,
jwe
More information about the Bug-octave
mailing list