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

Home » Public Forums » archive » Re: tested random # generator?
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
Re: tested random # generator? [message #7003] Mon, 16 September 1996 00:00
offenbrg is currently offline  offenbrg
Messages: 31
Registered: August 1993
Member
Tim Patterson <tim@raptor.lpl.arizona.edu> writes:

> Fronefield Crawford wrote:
>>
>> Does anyone have a random number generator written in IDL that's been
>> tested to work? I've tried linking in ran1.c (from Numerical Recipes)
>> via call_external, but I am having trouble doing that. For me it would
>> be easiest to use a routine already written in IDL would be best. Many
>> thanks.
>>
>> Froney Crawford
>> crawford@mit.edu


> In IDL 4.0.1 there are two routines RANDOMN and RANDOMU that
> generate random floating point numbers. I don't know if these
> were available in earlier versions.

> Tim

RANDOMU and RANDOMN have been around for quite a while. Note, however,
that these are not true random number generators, but are pseudo-random
number generators...I don't know of an actual random number generator that
works in IDL.

Joel
--
"...And I am unanimous in this" - Mrs. Slocumbe
------------------------------------------------------------ ----------
| Joel D Offenberg | offenbrg@fondue.gsfc.nasa.gov |
| Hughes STX, NASA/GSFC/LASP | UIT Sci team & COBE Unix SysAdm |
Re: tested random # generator? [message #7016 is a reply to message #7003] Fri, 13 September 1996 00:00 Go to previous message
Tim Patterson is currently offline  Tim Patterson
Messages: 65
Registered: October 1995
Member
Fronefield Crawford wrote:
>
> Does anyone have a random number generator written in IDL that's been
> tested to work? I've tried linking in ran1.c (from Numerical Recipes)
> via call_external, but I am having trouble doing that. For me it would
> be easiest to use a routine already written in IDL would be best. Many
> thanks.
>
> Froney Crawford
> crawford@mit.edu


In IDL 4.0.1 there are two routines RANDOMN and RANDOMU that
generate random floating point numbers. I don't know if these
were available in earlier versions.

Tim
Re: tested random # generator? [message #7023 is a reply to message #7016] Fri, 13 September 1996 00:00 Go to previous message
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
Fronefield Crawford (crawford@space.mit.edu) wrote:

: Does anyone have a random number generator written in IDL that's been
: tested to work? I've tried linking in ran1.c (from Numerical Recipes)
: via call_external, but I am having trouble doing that. For me it would
: be easiest to use a routine already written in IDL would be best. Many
: thanks.

IDL> print, randomn(seed,5)
-0.921359 0.709662 -0.0300814 0.556668 0.0501184
IDL> print, randomu(seed,5)
0.0368400 0.169594 0.364733 0.0678048 0.594544

Seems to work...

Peter
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL to C++ compiler
Next Topic: Re: Coping with DOS filenames

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

Current Time: Fri Oct 10 14:08:42 PDT 2025

Total time taken to generate the page: 1.44066 seconds