Computes the cubic spline interpolation of the input data.
pp = spline(x, y)
yy = spline(x, y, xx)
Vector, matrix, or n-dimensional array. If you use the syntax spline(x, y), y can be real or complex. If you use the syntax spline(x, y, xx), y must be real. If the last dimension of y has the same length as x, MathScript adapts not-a-knot end conditions. If the last dimension of y has two more elements than x, MathScript uses the first and last elements of y as the end slopes for the cubic spline.
New abscissa. xx is a vector, matrix, or n-dimensional array.
Piecewise polynomial form of the cubic spline interpolant.
Values of a piecewise polynomial corresponding to xx.
X = 0:6; Y = [pi/2, 0, 1, 0, -1, 0, pi/2]; XX = 0:0.1:6; YY = spline(X, Y, XX); plot(X, Y, 'o', XX, YY, '-')
Where This Node Can Run:
Desktop OS: Windows
FPGA: This product does not support FPGA devices