unmkpp
Piecewise polynomial struct extraction.
Syntax
[breaks,coefs,pieces,order,dim] = unmkpp(pp)
Inputs
- pp
- A piecewise polynomial struct.
Outputs
- breaks
- The coordinates that define the intervals for each polynomial piece.
- coefs
- The coefficients of each polynomial piece.
- pieces
- The number of polynomial pieces.
- order
- The degree of the polynomial plus 1.
- dim
- The dimension, or the number of piecewise polynomials.
Example
breaks = [10, 20, 30, 40, 50];
L = length(breaks) - 1;
order = 3;
coefs = zeros(L, order);
coefs(1, :) = [2, 3, 4];
coefs(2, :) = [3, 4, 5];
coefs(3, :) = [4, 5, 6];
coefs(4, :) = [6, 7, 8];
pp = mkpp(breaks,coefs);
[breaks,coefs,pieces,order,dim] = unmkpp(pp)
breaks = [Matrix] 1 x 5
10 20 30 40 50
coefs = [Matrix] 4 x 3
2 3 4
3 4 5
4 5 6
6 7 8
pieces = 4
order = 3
dim = 1