Difference between Matlab and Octave in random seeding
Jaroslav Hajek
highegg at gmail.com
Mon Mar 3 02:11:14 CST 2008
On Mon, Mar 3, 2008 at 8:55 AM, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
> 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?
>
In matlab, rand and randn seem to have independent internals, but the
rest like exprnd, gamrnd are implemented using calls to rand and/or
randn.
> Thanks,
>
> jwe
>
>
> _______________________________________________
> Bug-octave mailing list
> Bug-octave at octave.org
> https://www.cae.wisc.edu/mailman/listinfo/bug-octave
>
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Bug-octave
mailing list