Interpolation function



On Sat, Dec 10, 2005 at 10:12:25AM +1300, Glenn Ramsey wrote:
> Hi,
> 
> Is there a function in Maxima that will allow me to use data points to 
> obtain values by linear (or otherwise) interpolation of the data?
> 
> Glenn

I was disappointed when I tried to do something like this and found
that maxima uses dynamic scope instead of building a closure. I was
looking to write a function which takes data as an argument and
returns a function that does the interpolation, this is a standard
trick in LISP, but without closures it was not trivial.

On the other hand it wouldn't be hard to write your own function which
takes a list of pairs [[x,y],[x,y]...] and a new x value, and does
linear interpolation between the points (might require sorting the
input on the x coordinate).

If one exists already, I'd be happy to hear about it too, especially
if there is something like cubical splines or an akima spline routine.


-- 
Daniel Lakeland
dlakelan@street-artists.org
http://www.street-artists.org/~dlakelan