Page History: splines

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


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:

splines

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

X-vector ascending

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:

X-vector not sorted

ScrewTurn Wiki version 2.0.37. Some of the icons created by FamFamFam.