Extract piecewise polynomial details
Unwrap Piecewise Polynomial Information
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
scalar | vector
Dimension of target, returned as a scalar or vector.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
ppmust be a valid piecewise polynomial structure created by
pchipin MATLAB® or by the code generator.
Code generation does not support
ppstructures created by
Run code in the background using MATLAB®
backgroundPool or accelerate code with Parallel Computing Toolbox™
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
Introduced before R2006a