Where Function with Arrays [message #40141] |
Mon, 19 July 2004 18:24 |
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
|
|
|