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

Home » Public Forums » archive » Subtracting from double complex array
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: Subtracting from double complex array [message #92539 is a reply to message #92538] Sat, 09 January 2016 13:02 Go to previous messageGo to previous message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Saturday, January 9, 2016 at 7:53:59 AM UTC-7, algha...@gmail.com wrote:
> Hi all
>
> I have a double complex array for example 500 by 500 and I want to subtract (3.5e14 + j 2.5e12) from all the values in the complex array that I have... Is there a way of doing it in IDL
>
> Thanks

IDL> a = dcomplexarr(500, 500) ; your array, simulated with zeroes
IDL> a -= dcomplex(3.5d14, 2.5d12) ; subtracts the scalar from all elements
IDL> print, a[0]
( -3.5000000e+014, -2.5000000e+012)

Jim P.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: idlcoyote.com
Next Topic: scientific image

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

Current Time: Wed Oct 08 13:58:14 PDT 2025

Total time taken to generate the page: 0.00426 seconds