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

poly_pw (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 Class: polynomials

Requires: MathScript RT Module

Syntax

[pieces, order] = poly_pw(breaks, coefs)

Legacy Name: mkpp

Description

Constructs a piecewise polynomial.

Examples

Inputs

Name Description
breaks Specifies the points at which the piecewise polynomial breaks. breaks is a vector.
coefs Specifies the coefficients of the piecewise polynomial. coefs is a matrix. The size of coefs must equal the length of breaks.

Outputs

Name Description
pieces Returns the number of pieces of the polynomial. pieces is a scalar.
order Returns the polynomial order. order is a scalar.

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

P = [2, 1, 0, 3; 1, -8, 0, 1];
[PIECE, ORDER] = poly_pw([0, 1, 2], P);
X = -1:0.01:1;
plot(X, polyval(P(1, :), X), X, polyval(P(2, :), X))

[PIECES, ORDER] = poly_pw([1, 2, 3], rand(2, 4))

Related Topics

spline


 

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