This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

unmkpp

Extract piecewise polynomial details

Syntax

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

Description

example

[breaks,coefs,L,order,dim] = unmkpp(pp) extracts information from the fields of the piecewise polynomial structure pp.

Examples

collapse all

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

Input Arguments

collapse all

Piecewise polynomial, specified as a structure. You can create pp using spline, pchip, interp1, or the spline utility function mkpp.

Output Arguments

collapse all

Break points, returned as a vector of length L+1 with strictly increasing elements that represent the start and end of each of L intervals.

Polynomial coefficients, returned as an L-by-k matrix with each row coefs(i,:) containing the local coefficients of an order k polynomial on the ith interval, [breaks(i),breaks(i+1)].

Number of intervals, returned as a scalar.

Order of polynomials, returned as a scalar.

Dimension of target, returned as a scalar or vector.

Extended Capabilities

See Also

| | |

Introduced before R2006a