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

Home » Public Forums » archive » Re: Distance between two sets of datapoints
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: Distance between two sets of datapoints [message #70238 is a reply to message #70228] Thu, 25 March 2010 12:38 Go to previous messageGo to previous message
Maxwell Peck is currently offline  Maxwell Peck
Messages: 61
Registered: February 2010
Member
Thanks Ken, I'll give it a shot. I had tried a similar loop (I
thought) but it seemed to be very slow that is why i was looking at
vectorising it similar to distance_measure.

Thanks
Max

On Mar 26, 6:04 am, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
> In article <k-bowman-EEB2FB.09554725032...@news.tamu.edu>,
>  "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
>
>
>
>> FOR i = 0, nb-1 DO BEGIN
>>    d = SQRT((xb[i] - xa)^2 + (yb[i] - ya)^2)
>>    dist[0,i] = d
>> ENDFOR
>
> I just realized this could be simplified to
>
> FOR i = 0, nb-1 DO dist[0,i] = SQRT((xb[i] - xa)^2 + (yb[i] - ya)^2)
>
> which removes some unneeded memory access.
>
> Ken
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Highlight default button
Next Topic: IDL licensing

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

Current Time: Wed Oct 08 20:10:07 PDT 2025

Total time taken to generate the page: 1.09693 seconds