Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

spline (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the approximation and the resampling classes.

Syntax

yy = spline(x, y, xx)

Description

Computes the cubic spline interpolation of the input data.

Examples

Inputs

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.

Outputs

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

Examples

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

mkpp
pchip


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit