How to generate equivalent "random" numbers in matlab and numpy?

Feb. 23, 2009
12:11 p.m.
Dear all, I'd like to generate equivalent sequences of 'random' numbers in matlab and numpy, is there any way I can do that? I tried to fix the seed (see below) but it doesn't work. # numpy In [29]: np.random.seed(1); np.random.permutation(5)+1 Out[29]: array([3, 2, 5, 1, 4]) % matlab
rand('seed', 1); randperm(5)
ans = 4 3 5 2 1 Thanks for your time. Best regards, -- Nicolas Pinto Ph.D. Candidate, Brain & Computer Sciences Massachusetts Institute of Technology, USA http://web.mit.edu/pinto
5956
Age (days ago)
5956
Last active (days ago)
1 comments
2 participants
participants (2)
-
Nicolas Pinto
-
Sturla Molden