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


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

Legacy Name: mkpp


Constructs a piecewise polynomial.



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.


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


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


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



 Was this document helpful?  submit
  Helpful Not Helpful