Member of the polynomials class.
[pieces, order] = mkpp(breaks, coefs)
Constructs a piecewise polynomial.
| Name | Description |
| breaks | Specifies the points at which the piecewise polynomial breaks. breaks is a matrix. |
| 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. |
P = [2, 1, 0, 3; 1, -8, 0, 1];
[PIECE, ORDER] = mkpp([0, 1, 2], P);
X = -1:0.01:1;
plot(X, polyval(P(1, :), X), X, polyval(P(2, :), X))
[PIECES, ORDER] = mkpp([1, 2, 3], rand(2, 4))