Extract piecewise polynomial details
Create a piecewise polynomial structure for the polynomial on the interval [0 3], and then extract the information from the fields of the structure.
pp = mkpp([0 3],[1 1 1])
pp = struct with fields: form: 'pp' breaks: [0 3] coefs: [1 1 1] pieces: 1 order: 3 dim: 1
[breaks,coefs,L,order,dim] = unmkpp(pp)
breaks = 1×2 0 3
coefs = 1×3 1 1 1
L = 1
order = 3
dim = 1
breaks— Break points
Break points, returned as a vector of length
strictly increasing elements that represent the start and end of each
coefs— Polynomial coefficients
Polynomial coefficients, returned as an
with each row
coefs(i,:) containing the
local coefficients of an order
on the ith interval,
L— Number of intervals
Number of intervals, returned as a scalar.
order— Order of polynomials
Order of polynomials, returned as a scalar.
dim— Dimension of target
Dimension of target, returned as a scalar or vector.
Usage notes and limitations:
pp must be a valid piecewise polynomial
structure created by
pchip in MATLAB® or by the code generator.
Code generation does not support
interp1 in MATLAB.