FUNCTION REFERENCE

csape

Cubic spline interpolation with end conditions.

Cubic spline interpolation with end conditions.

Syntax

pp = csape(x, y)

Syntax

pp = csape(x, y, conds)

Syntax

pp = csape(x, y, conds, valconds)

conds is 'complete' or 'clamped' (end slopes), 'second' (end second derivatives), 'variational' (zero second derivatives, the natural spline), 'not-a-knot', 'periodic', or [c1 c2] with 1 (slope) or 2 (second derivative) per end. The end values are y's extra first and last entries when y has two more values per row than x, else valconds [left right]. Without values 'complete' and 1 use the default condition and 'second' and 2 use 0. The default (no conds, or 0) is the Lagrange condition: the end slope of the cubic through the four data nearest that end.

Example

pp = csape([0 1 2 3], [0 0 1 8 27 27], 'complete'); fnval(pp, 1.5)   % 3.375

Example

pp = csape(0:4, [0 1 0 -1 0], 'periodic'); fnval(pp, 0.5)

Differences from MATLAB: gridded data is not supported yet.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.