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

Home » Public Forums » archive » Now... (Random Numbers)
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
Now... (Random Numbers) [message #29880] Mon, 25 March 2002 10:41
Andrew Loughe is currently offline  Andrew Loughe
Messages: 9
Registered: October 1998
Junior Member
G Karas wrote:
>
> I was trying to make some unique filenames...
>
> first I tried the randomn() function, but it always gave
> back the same number for the same seed...


I use something like this to generate a random number...

seed = LONG( (SYSTIME(1) - LONG(SYSTIME(1))) * 1.e6 )
randnum = RANDOMU(seed, 1)
print, randnum, format='(f27.25)'

For your purpose, the value of "seed" might be used in the filename.

--
Andrew Loughe =====================================================
NOAA/OAR/FSL/AD R/FS5 | email: Andrew.Loughe@noaa.gov
325 Broadway | wwweb: www-ad.fsl.noaa.gov/users/loughe
Boulder, CO 80305-3328 | phone: 303-497-6211 fax: 303-497-6301
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL Movie Viewer
Next Topic: Re: A little handy date function

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

Current Time: Wed Oct 08 15:47:36 PDT 2025

Total time taken to generate the page: 0.00613 seconds