mardi 16 février 2016

In octave poissrnd ignores the seed that has been set

I am running octave 3.8.1. Even if I set the seed for the random number generator, poissrnd always produce a different number. Let us consider the following code, for example

for i=1:2
    rand('state',1); randn('state',1);
    poissrnd(10)
end

Running it in matlab, produce the same number in both iterations. Running it in Octave, always produce a different number.

How can I correctly set a seed to poissrnd?

Thank you




Aucun commentaire:

Enregistrer un commentaire