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

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.

Details

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

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