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

Home » Public Forums » archive » Re: Array comparison part 2
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: Array comparison part 2 [message #32395 is a reply to message #32393] Fri, 04 October 2002 06:58 Go to previous messageGo to previous message
tam is currently offline  tam
Messages: 48
Registered: February 2000
Member
Sean Raffuse wrote:
> Thanks for all the help on my first question. I now have a related
> question.
>
> What is the best (read: fastest) way to do the following:
>
> I have an array of coordinates, A = intarr(2,25)
> and I have another array of a specific location, B = [125,1043]
>
> I would like to determine if location B is one of the coordinates in A. I
> need to know if A[*,?] = 125, 1043
>
> Is it possible to do this without splitting A?
>
> Thanks,
>
> Sean
>
>

Just try

w = where(b[0] eq a[0,*] and b[1] eq a[1,*])

No need for anything complex here.
Or perhaps it's too early in the morning and I'm missing something...

Regards,
Tom McGlynn
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL curve fitting program (correction)
Next Topic: Array Subscripting Memory Usage (watch out!)

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

Current Time: Sat Oct 11 13:18:43 PDT 2025

Total time taken to generate the page: 0.56193 seconds