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 
Return to the default flat view Create a new topic Submit Reply
Re: Interpolation question [message #49584 is a reply to message #25895] Wed, 02 August 2006 09:31 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Wed, 02 Aug 2006 11:21:55 -0500, Mike Wallace wrote:

> 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]

new_data=interpol(float(data),time,new_time)

The float is needed or all calcs are done in integer space (probably not
what you want).

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Length of command line input
Next Topic: ellipsoid 3D

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

Current Time: Sat Oct 11 15:29:41 PDT 2025

Total time taken to generate the page: 2.32119 seconds