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

Home » Public Forums » archive » Array operation question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Array operation question [message #33933] Fri, 07 February 2003 04:08
Edd Edmondson is currently offline  Edd Edmondson
Messages: 50
Registered: January 2003
Member
It's yet another question about how to get an efficient operation on an
array:

I have one array
q=[num1,num2,num3,num4]
and an array
r=[ [num1a,num1b,num1c...],[num2a,num2b..],[num3a...],[num4a..] ]
and I want to find w=r-q such that
w=[ [num1a-num1,num1b-num1,num1c-num1...],[num2a-num2..],[num3a- num3..]..]

Is there an efficient way of doing it without expanding q so that it is
the same dimension as r? That'd be very expensive in terms of memory for
me, unfortunately. I could loop over the 4 elements of q and r and do that
seperately but I'd quite like to eliminate that last loop.

I've tried various things but all fall victim to the 'feature' mentioned
earlier that IDL will make the result have the dimensions of the smaller
array.

--
Edd
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: XROI in IDL5.6 on MAC OS 10.2?
Next Topic: Re: Array operation question

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

Current Time: Thu Oct 09 23:46:26 PDT 2025

Total time taken to generate the page: 0.96382 seconds