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

Home » Public Forums » archive » Re: Reverse interpolation?
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: Reverse interpolation? [message #21207 is a reply to message #21201] Thu, 17 August 2000 00:00 Go to previous messageGo to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Craig Markwardt wrote:
>
> Martin Schultz <martin.schultz@dkrz.de> writes:
>
> Craig wrote:
>
>>
> ...
>> newxx = Spline( oldy, oldx, newy, 5. )
> ...
>
> If you are trying to match a lot of values, then I agree that the
> spline interpolation is one of the best solutions. However, I have
> had bad experiences with the SPLINE function. It tends to have
> problems when the points are too far apart, and it's also pretty slow.
> I found the Numerical Recipes version of spline interpolation to be
> much better (built in functions SPL_INTERP and SPL_INIT).
>
> If v1 is vector of values sampled at original altitudes a1, and you
> want to resample at new altitudes a2, then you do something like this:
>
> v2 = spl_interp(a1, v1, spl_init(a1, v1), a2)
>
> Now v2 has the newly sampled values. In principle a2 can be one value
> so even if you want a single value the spline interpolation can be
> useful, and even pretty fast.
>

I had looked into SPL_INTERP and SPL_INIT, but I found the
problem was that it does not allow for "smoothing" (more
correctly: controlling "the amount of tension that is applied to
the curve"). I certainly like the idea of controllin the
endpoints (which you can do only in SPL_INTERP). Are you aware of
a solution that can do both?


Martin

--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie
[[
[[ Bundesstr. 55, 20146 Hamburg
[[
[[ phone: +49 40 41173-308
[[
[[ fax: +49 40 41173-298
[[
[[ martin.schultz@dkrz.de
[[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Coastal boundaries over sat data
Next Topic: Re: VIRUS ALERT (was: Ghost object)

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

Current Time: Wed Oct 15 13:50:36 PDT 2025

Total time taken to generate the page: 0.64127 seconds