This is an old revision of the document!


InterpolatingFunction

1D interpolation is currently implemented using cubic splines. Further methods will follow. An interpolating function can be evaluated at a given point or on a set of points, which gives a speed boost, if these points are in ascending order. Higher order derivatives of the interpolating function can also be evaluated.

Example

Input

Example.Quanty
x = {1,2,3}
y = {1,4,9}
f = InterpolatingFunction.Spline(x,y)
 
f(2.5) -- evaluates f at 2.5
n = 1
f(2.5,n) --evaluates the n-th derivative of f at 2.5
 
f({1.2,2.5,2.7,2.9}) -- evaluates f successively at the given values

Result

Try it yourself ;)

Table of contents

Print/export