help-octave
[Top][All Lists]
Advanced

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

same pseudo random sequence in matlab?


From: Andreas Weber
Subject: same pseudo random sequence in matlab?
Date: Fri, 04 Jul 2014 10:53:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0

Hi at all.

Is it possible to get the same pseudo random sequence in Octave and
Matlab? I tried setting seed and state:

Octave 4.1.0+ 47d4b680d0e0
octave:1> rand('state', 1); rand(1,3)
ans =
   0.13436   0.84743   0.76377
octave:2> rand('seed', 1); rand(1,3)
ans =
   0.866802   0.912651   0.093661

Matlab R2014a:
>> rand('state', 1); rand(1,3)
ans =
    0.9528    0.7041    0.9539

>> rand('seed', 1); rand(1,3)
ans =
    0.5129    0.4605    0.3504

-- Andy



reply via email to

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