Re: what is i in idl 4.0 ? [message #16640] |
Tue, 10 August 1999 00:00 |
gurman
Messages: 82 Registered: August 1992
|
Member |
|
|
In article <MPG.121944d029ce458c989885@news.frii.com>, davidf@dfanning.com
(David Fanning) wrote:
> But then again, IDL 3.6 was s-o-o-o long ago, that
> maybe something like this did exist and I've forgotten
> about it. There are days I feel like I've forgotten more
> about IDL than I currently know. :-(
David -
I suspect that you've forgotten more about IDL than most of us lurkers
will _ever_ know. :-)
Joe
--
| Joseph B. Gurman, NASA Goddard Space Flight Center, Solar Physics
| Branch, Greenbelt MD 20771 USA / Federal employees are still
| prohibited from holding opinions while at work. Therefore, any
| opinions expressed herein are somebody else's.
|
|
|
Re: what is i in idl 4.0 ? [message #16646 is a reply to message #16640] |
Tue, 10 August 1999 00:00  |
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
|
|
|
Re: what is i in idl 4.0 ? [message #16649 is a reply to message #16640] |
Mon, 09 August 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
John Stanly Videen (user@internet.com) writes:
> 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
I've been hanging around IDL for a LONG time, but
I've never heard of a system variable named !J.
I'm going to guess that this was a system variable
that a user created in a startup file in your IDL
3.6 distribution that is not being created in your
IDL 4.0 distribution.
But then again, IDL 3.6 was s-o-o-o long ago, that
maybe something like this did exist and I've forgotten
about it. There are days I feel like I've forgotten more
about IDL than I currently know. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|