unmkpp

Piecewise polynomial struct extraction.

Syntax

[breaks,coefs,pieces,order,dim] = unmkpp(pp)

Inputs

pp
A piecewise polynomial struct.
See mkpp for details.

Outputs

breaks
The coordinates that define the intervals for each polynomial piece.
Dimension: vector
coefs
The coefficients of each polynomial piece.
Dimension: matrix
pieces
The number of polynomial pieces.
Type: integer
Dimension: scalar
order
The degree of the polynomial plus 1.
This is the spline order, rather than polynomial order.
Type: integer
Dimension: scalar
dim
The dimension, or the number of piecewise polynomials.
Type: integer
Dimension: scalar

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