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

Home » Public Forums » archive » Re: what is i in idl 4.0 ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: what is i in idl 4.0 ? [message #16646 is a reply to message #16640] Tue, 10 August 1999 00:00 Go to previous messageGo to previous message
Richard G. French is currently offline  Richard G. French
Messages: 65
Registered: June 1997
Member
John Stanly Videen wrote:
>
> Help,
>
> Does anyone know what the system variable representation for i is in idl
> 4.0?
>
> [ where i = sqrt(-1) ]
>
> In idl 3.6, it used to be !j, but this doesn't seem to work in 4.0....
>
> eg. this code works in 3.6, but not 4.0:
>
> phase=atan(imaginary(data_ref), float(data_ref))
> temp=exp(- phase * !j )
> data=temp*data
>
> john

I agree with David Fanning. Try putting this in your startup file:

DEFSYSV,'!j',dcomplex([0.d0,1.d0])

then, for example, you can do

IDL> print,exp(!J*!dpi/4)
( 0.70710678, 0.70710678)

DIck French
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Extension to IDL REVERSE function
Next Topic: Re: IDL> WHY IS THIS A NULL FILENAME

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

Current Time: Sat Oct 11 08:53:01 PDT 2025

Total time taken to generate the page: 2.96533 seconds