help-octave
[Top][All Lists]
Advanced

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

Same sequence of random number generators than under Matlab?


From: Mathieu Dubois
Subject: Same sequence of random number generators than under Matlab?
Date: Sun, 03 Jun 2012 16:03:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

Hello,

I want to comapre the output of the Self-Organinzin Map algorithm under Matlab and Octave.

The algorithm is stochastic because, as in most training algorithm, the data are presented inrandom order. In order to compare as precisely as possible the Matlab and Octave version it seems necessary to have the same sequence of random numbers.

Is there a way to do that?

I have tried the following:
rand('twister', 10);
s = rand(10, 1);
disp(s);
disp(mean(s));
disp(var(s));

The sequences are different (but the statistics are close).

Mathieu




reply via email to

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