unmkpp

Extracts the parts of a piecewise polynomial structure.

Category: Mathematics > Interpolation

Syntax

[x, c, l, k, d] = unmkpp(pp)

Returns the break points, coefficients, number of pieces, order and dimension of pp.

Description

unmkpp is the inverse of mkpp: it reads the fields of the structure so that its coefficients can be inspected or modified, for example to differentiate each piece by hand. Reading the fields directly, as in pp.coefs, gives the same information.

Input arguments

pp
Piecewise polynomial structure created by mkpp, spline, pchip or makima.

Output arguments

x
Break points.
c
Coefficient matrix, one row per piece.
l
Number of pieces.
k
Order of the polynomials (degree plus one).
d
Dimension of the function value.

Example

Taking a structure apart

pp = mkpp([0 1 2], [1 0 0; 2 1 0]);
[x, c, l, k, d] = unmkpp(pp)
Output
x = 1×3

     0     1     2
c = 2×3

     1     0     0
     2     1     0
l = 2
k = 3
d = 1

See also

mkpp ppval spline polyder