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

Home » Public Forums » archive » Random Number Replication
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Random Number Replication [message #16592] Fri, 06 August 1999 00:00 Go to previous message
dsheerin is currently offline  dsheerin
Messages: 8
Registered: June 1998
Junior Member
Hi
I have tried to use the following code to generate a sequence of
random numbers:

FOR k = 1, 4 DO BEGIN
p = RANDOMU (S)
PRINT, p
ENDFOR

Why, when I repeat the operation, does the code (nearly) give me the
same list of random numbers shifted by 1? I thought that each time
RANDOMU was called it took a new value for the SEED due to S being
undefined. How do I 'undefine' S after it has been called?

Cheers

David Sheerin
[Message index]
 
Read Message
Read Message
Previous Topic: 4-2D images ->> 1-3D Image
Next Topic: what is i in idl 4.0 ?

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

Current Time: Wed Oct 08 15:52:27 PDT 2025

Total time taken to generate the page: 0.00523 seconds