comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » RANDOM question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
RANDOM question [message #33224] Mon, 16 December 2002 07:52 Go to next message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
I would like to save the state of the pseudorandom-number generator in a
file so that I can resume (or reproduce) a calculation at a later time.
Does anyone know if the state variable ("seed") is always a 36-element
long vector? The docs say that "seed" is "a named variable that
contains a longword array of the proper length", but does not give the
"proper length".

Thanks, Ken


IDL> seed = 19
IDL> x = randomn(seed)
IDL> print, x
0.774932
IDL> help, seed
SEED LONG = Array[36]
Re: RANDOM question [message #33313 is a reply to message #33224] Mon, 16 December 2002 09:24 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <onadj5anuj.fsf@cow.physics.wisc.edu>,
Craig Markwardt <craigmnet@cow.physics.wisc.edu> wrote:

> I think in the past, defined as IDL 4.X, the SEED value was a scalar
> quantity. I think RSI will probably always reserve the right to
> adjust the internal contents and form of SEED in order to maintain the
> quality of the random numbers.

Within a single version of IDL. :-)

Ken
Re: RANDOM question [message #33315 is a reply to message #33224] Mon, 16 December 2002 09:13 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Kenneth Bowman <k-bowman@null.tamu.edu> writes:
> I would like to save the state of the pseudorandom-number generator in a
> file so that I can resume (or reproduce) a calculation at a later time.
> Does anyone know if the state variable ("seed") is always a 36-element
> long vector? The docs say that "seed" is "a named variable that
> contains a longword array of the proper length", but does not give the
> "proper length".

Hi Ken--

I think in the past, defined as IDL 4.X, the SEED value was a scalar
quantity. I think RSI will probably always reserve the right to
adjust the internal contents and form of SEED in order to maintain the
quality of the random numbers.

So it really depends on what your definition of "always" is.

Craig



--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: "splitting" an index
Next Topic: supplementation to "splitting" an index

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:45:34 PDT 2025

Total time taken to generate the page: 0.00509 seconds