FUNCTION REFERENCE
csapi
Cubic spline interpolation with the not-a-knot end condition.
Cubic spline interpolation with the not-a-knot end condition.
Syntax
pp = csapi(x, y)Syntax
values = csapi(x, y, xx)The cubic spline with breaks at the data sites whose first and last interior breaks are not knots (the third derivative is continuous there). x is sorted; repeated sites are an error. Two sites give the line, three the parabola. y may be a matrix with one column per site (one row per component). With xx the spline is evaluated there.
Example
pp = csapi([0 1 2 3], [0 1 8 27]); fnval(pp, 1.5) % 3.375Example
csapi([0 1 3], [1 0 4], 2) % 1Differences from MATLAB: gridded data (x as a cell array) is not supported yet.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.