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

Home » Public Forums » archive » Re: Find the nearest location only on left/right side in SRCOR and MATCH_2D function
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: Find the nearest location only on left/right side in SRCOR and MATCH_2D function [message #78318] Fri, 11 November 2011 08:19
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On 11/11/11 7:22 AM, vijay s wrote:
> Hi,
>
> I want to match two set of coordinates for that i had used SRCOR
> and MATCH_2D function. These two find the nearest neighbor of
> locations in all directions. But, i need to find the location (x2,y2)
> which is near and only left side of x1,y1.For all pair i want the left
> most nearest. How i can change the above functions for my
> requirements.
>
>
> Thanks

I think that you can do this very efficiently in MATCH_2D by simply
replacing the i for loop with i=1. I.e. replace:

for i=0,1 do begin ;; Loop over 4 bins in the correct quadrant direction

with

i=1 ;; Only look to the right of x2,y2

and get rid of the last endfor.

-Jeremy.
[Message index]
 
Read Message
Previous Topic: Re: changing the content of a NCDF file
Next Topic: Re: Is there a way to find every variable in current session where the variable name contains a specific string?

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

Current Time: Wed Oct 08 18:45:08 PDT 2025

Total time taken to generate the page: 0.00230 seconds