Re: rand function question
- From: Peter Perkins <Peter.PerkinsRemoveThis@xxxxxxxxxxxxx>
- Date: Thu, 06 Sep 2007 07:59:39 -0400
Joachim wrote:
Peter Perkins <Peter.PerkinsRemoveThis@xxxxxxxxxxxxx> wroteAlso, the period of the generator is _very_ long (2^19936or thereabouts), sowhile you might get repeated values in your lifetime, youwill not see thesequence repeat any time in the foreseeable future.
Well, on my Matlab (R2007a/Linux x86), every time I fire up
Matlab and enter (as first command)
format long; rand
I get
ans =
0.814723686393179
I'm guessing you know the reason for this, but just in case:
>> help rand
[snip]
The sequence of numbers produced by RAND is determined by the internal
state of the generator. Setting the generator to the same fixed state
allows computations to be repeated. Setting the generator to different
states leads to unique computations, however, it does not improve any
statistical properties. Since MATLAB resets the state at start-up, RAND
will generate the same sequence of numbers in each session unless the
state is changed.
.
- References:
- rand function question
- From: zhiyuan li
- Re: rand function question
- From: Dave Robinson
- Re: rand function question
- From: Peter Perkins
- Re: rand function question
- From: Joachim
- rand function question
- Prev by Date: Re: Princomp on data with #observation lower than the # of dimansions
- Next by Date: www.nikeperfect.com-Discount NIKE SHOES
- Previous by thread: Re: rand function question
- Next by thread: Re: rand function question
- Index(es):
Relevant Pages
|