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

Home » Public Forums » archive » External development: Populating a complex array in C
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: External development: Populating a complex array in C [message #91534 is a reply to message #91533] Sun, 26 July 2015 03:51 Go to previous messageGo to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
On Sat, 25 Jul 2015 23:18:03 +0200, Heinz Stege wrote:

> On Sat, 25 Jul 2015 11:08:28 -0700 (PDT), David Grier wrote:
>
>> Alternatively, does anyone know how to convert two IDL_TYPE_FLOAT arrays
>> into one IDL_TYPE_COMPLEX array along the lines of the COMPLEX(real,imag)
>> function in IDL?
>>
> Yes, here is an example:
> real=findgen(5)
> imag=4.-findgen(5)
> comp=complex(real,imag)
> help,comp
> print,comp
> IDL prints:
> COMP COMPLEX = Array[5]
> ( 0.000000, 4.00000)( 1.00000, 3.00000)
> ( 2.00000, 2.00000)( 3.00000, 1.00000)
> ( 4.00000, 0.000000)
>
This obviously is not what you wanted to ask for. Sorry for not
realizing the meaning of "along the lines of".

You may be interested in the function
IDL_VPTR IDL_CvtComplex(int argc, IDL_VPTR argv[]).
The External Development Guide says, that this function is the direct
implementation of the IDL command COMPLEX.

Cheers, Heinz
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dynamic Resize Moves Window
Next Topic: Current color table

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

Current Time: Wed Oct 08 20:08:44 PDT 2025

Total time taken to generate the page: 0.03671 seconds