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

Home » Public Forums » archive » Interpolation question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Interpolation question [message #49587] Wed, 02 August 2006 09:21
Mike Wallace is currently offline  Mike Wallace
Messages: 25
Registered: May 2006
Junior Member
I have an array that I need to interpolate and would like to find a
semi-efficient way to do it. Well, almost anything would be more
efficient than what I'm currently doing.

I have an array of data and a corresponding array of times when the data
was taken. I have a third array that represents the times that I want
to calculate the interpolation. How can I easily (and efficiently)
calculate the data points corresponding to that array?


For example...

data = [12, 6, 1, 4, 8, 8, 10]
time = [ 0, 1, 4, 7, 8, 11, 14]

Now, I say that I wanted to interpolate the data array but only
calculate the interpolation for the time values in some new array...

new_time = [1, 4, 5, 8, 9, 12]



Right now, I'm looping over the new_time array, finding the indexes
where the new_time value falls, and doing a simple weighted average. I
just have a gut feeling that there's a better way. TIA,

Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Printing a collection of widget items
Next Topic: correlation of images

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

Current Time: Wed Oct 08 13:44:19 PDT 2025

Total time taken to generate the page: 0.00703 seconds