[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Same sequence of random number generators than under Matlab?
From: |
Sergei Steshenko |
Subject: |
Re: Same sequence of random number generators than under Matlab? |
Date: |
Sun, 3 Jun 2012 10:45:41 -0700 (PDT) |
----- Original Message -----
> From: Mathieu Dubois <address@hidden>
> To: address@hidden
> Cc:
> Sent: Sunday, June 3, 2012 5:03 PM
> Subject: Same sequence of random number generators than under Matlab?
>
> 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
>
>
As others have already suggested, generate the sequence in one tool (either
Matlab or Octave), store it in a file, and use it in the other tool.
Regards,
Sergei.
- Same sequence of random number generators than under Matlab?, Mathieu Dubois, 2012/06/03
- Re: Same sequence of random number generators than under Matlab?, Doug Stewart, 2012/06/03
- Re: Same sequence of random number generators than under Matlab?, Martin Helm, 2012/06/03
- Re: Same sequence of random number generators than under Matlab?, ahowe42, 2012/06/03
- Re: Same sequence of random number generators than under Matlab?, Jordi Gutiérrez Hermoso, 2012/06/03
- Re: Same sequence of random number generators than under Matlab?,
Sergei Steshenko <=
- Re: Same sequence of random number generators than under Matlab?, Alasdair McAndrew, 2012/06/04
- Re: Same sequence of random number generators than under Matlab?, Alasdair McAndrew, 2012/06/04
- Re: Same sequence of random number generators than under Matlab?, Mathieu Dubois, 2012/06/05
- Re: Same sequence of random number generators than under Matlab?, Alasdair McAndrew, 2012/06/05
- Re: Same sequence of random number generators than under Matlab?, Alasdair McAndrew, 2012/06/05
- Re: Same sequence of random number generators than under Matlab?, Doug Stewart, 2012/06/05
- Re: Same sequence of random number generators than under Matlab?, Mathieu Dubois, 2012/06/05
- Re: Same sequence of random number generators than under Matlab?, David Bateman, 2012/06/07