[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #33682] rand results are not repeatable
From: |
David Bateman |
Subject: |
[Octave-bug-tracker] [bug #33682] rand results are not repeatable |
Date: |
Fri, 01 Jul 2011 20:39:42 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0 |
Update of bug #33682 (project octave):
Status: None => Wont Fix
Assigned to: None => dbateman
_______________________________________________________
Follow-up Comment #1:
No in fact with a monte carlo simulation you want to ensure that every
simulation in a particular run is different. Imagine I do something like
% ssh address@hidden -exec myscript
% ssh address@hidden -exec myscript
and the post process the results into a monte carlo, which is pretty much what
any monte carlo simulation on a cluster is going to do, but called many many
more time. I want each and every version of myscript to start with a different
random seed, which is what Octave does. Getting the same behavior in matlab is
a pain in the arse as you have to generate the entropy source for the random
seed some how (something that Octave does for you). The inverse however, in
the rare case that you want the same random seed is easy to deal with, just
change your code to something like
rand("state", [1,2,3,4]);
disp(rand(1,10))
You can even add the line
rand("state", [1,2,3,4]);
to your .octaverc file and get this as the default behavior. However, I'd
resist making this the default for all users behavior as the workaround is
trivial and this feature is extremely useful. I'm marking this bug as "Won't
Fix". Sorry this is one case where the "bug" is in in matlab[1]
D.
[1]
http://www.gnu.org/software/octave/FAQ.html#index-Compatibility-with-_0040sc_007bMatlab_007d-38
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33682>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #33682] rand results are not repeatable,
David Bateman <=