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

spline (MathScript RT Module Function)

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

Owning Classes: approximation and resampling

Requires: MathScript RT Module

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

poly_pw
poly_pwhermite


 

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