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

Home » Public Forums » archive » Where Function with Arrays
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
Where Function with Arrays [message #40141] Mon, 19 July 2004 18:24
rats is currently offline  rats
Messages: 11
Registered: June 2004
Junior Member
Hi,
I have two arrays. Both of them have 3 columns (First array:(INDEX, X,
Altitude) and the other array:(INDEX, Y, Altitude). The first column
is the INDEX that I have created to make some intersection with both
arrays.
After the intersection a new array was created to contain all the
intersection points.
Now that I have these values I want to find the respective rows for
each array.
I was trying to do something like that:

int = setIntersection(ArrayX, ArrayY)
newArray = where(XArray[0,*] EQ int[*])

But it is not possible.

With the FOR loop I can do it, but it takes a long time ...

FOR ind = 0L, n_elements(int)-1 DO BEGIN
ValueX = [WHERE(XArray[0,*] EQ int[ind])]
ENDFOR

Is it possible to do without the for loop?

Thank you very much,
Rafael
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Subsetting an array with user defined values
Next Topic: valid vs managed widget

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

Current Time: Fri Oct 10 05:39:16 PDT 2025

Total time taken to generate the page: 0.48217 seconds