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

Home » Public Forums » archive » Another "IDL way to do this" question
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: Another "IDL way to do this" question [message #78340 is a reply to message #78271] Wed, 09 November 2011 10:26 Go to previous messageGo to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On 11/9/11 11:48 AM, Brian Wolven wrote:
> Aha! That was a routine I'd used in code prior to the 1998-1999 time frame when INTERPOL was modified, so that is good to know.
>
> Thank *you*! (and David...)

Since the creation of VALUE_LOCATE, it should be much faster than a
hand-coded binary search... in my code (which I'm working on modifying
for the general case) I use the following two lines to efficiently get
the fractional index:

u_in_x_low = value_locate(x, u)
xfrac = (u - u[u_in_x_low]) / (x[u_in_x_low+1] - x[u_in_x_low])

(the fractional index is then u_in_x_low+xfrac)

-Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Another "IDL way to do this" question
Next Topic: GRIB data question

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

Current Time: Fri Oct 10 14:18:40 PDT 2025

Total time taken to generate the page: 0.40410 seconds