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

Home » Public Forums » archive » Re: Imaginary is narrow minded
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: Imaginary is narrow minded [message #9846 is a reply to message #9842] Tue, 02 September 1997 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Now I'm really brainstorming. Here is another
program for Brian Jackel:

FUNCTION IF_IMAGINARY, variable
types = ['UNDEFINED', 'BYTE', 'INTEGER', 'LONG', 'FLOAT', $
'DOUBLE', 'COMPLEX', 'STRING', 'STRUCTURE', $
'DCOMPLEX', 'POINTER', 'OBJECT']
s = Size(variable)
thisType = types(s(s(0) + 1))
IF thisType EQ 'COMPLEX' THEN RETURN, Imaginary(variable) $
ELSE RETURN, 0.0
END

Then, you can do this:

imaginaryPart = IF_IMAGINARY(variable)

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
Customizable IDL Programming Courses
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Size of variables in bytes?
Next Topic: IDL -> MPEG

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

Current Time: Sat Oct 11 05:38:05 PDT 2025

Total time taken to generate the page: 0.96110 seconds