Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

spline (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Classes: approximation and resampling

Requires: MathScript RT Module


yy = spline(x, y, xx)


Computes the cubic spline interpolation of the input data.



Name Description
x Specifies a vector.
y Specifies a real or complex vector. If y has the same length as x, LabVIEW adapts not-a-knot end conditions. If y has two more elements than x, LabVIEW uses the first and last elements of y as the end slopes for the cubic spline. y also can be a matrix that represents a vector-valued piecewise polynomial. In this case, each column of y represents the value of one point.
xx Specifies the new abscissa. xx is a vector.


Name Description
yy Returns the values of a piecewise polynomial corresponding to xx. yy is a vector.


The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized


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, '-')

YY = spline(0:4, [0, 1, 0, -1, 0, 1, 0; pi/2, 0, 1, 0, -1, 0, pi/2], 0:0.1:4)

Related Topics



 Was this document helpful?  submit
  Helpful Not Helpful