Page History: splines
Compare Page Revisions
Page Revision: 2009/09/19 03:20
There are three functions in SMath for spline interpolation:
linterp('X-vector','Y-vector','x') - Returns a linearly interpolated value at x for data vectors X-vector and Y-vector of the same size.
cinterp('X-vector','Y-vector','x') - Returns a cubic spline interpolated value at x for data vectors X-vector and Y-vector of the same size.
ainterp('X-vector','Y-vector','x') - Returns Akima-spline interpolated value at x for data vectors X-vector and Y-vector of the same size.
Here is the example of presenting these functions:

You can have the x-vector sorted in ascending order:

And also
X-vector not sorted . As the main usage of the interpolation is to estimate y-value for the x-value not given in the table, this is
not advisable: