poly_pw (MathScript RT Module Function)

LabVIEW 2012 MathScript RT模块帮助

版本日期:June 2012

产品编号:373123C-0118

»查看产品信息
下载帮助
(仅限Windows)

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

文章是否对您有帮助?

没有帮助