Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Make piecewise polynomial

`pp = mkpp(breaks,coefs)`

pp = mkpp(breaks,coefs,d)

`pp = mkpp(breaks,coefs)`

builds
a piecewise polynomial, `pp`

, from its breaks and
coefficients.

`breaks`

is a vector of length`L+1`

with strictly increasing elements which represent the start and end of each of`L`

intervals.`coefs`

is an`L`

-by-`k`

matrix with each row`coefs(i,:)`

containing the local coefficients of an order`k`

polynomial on the*i*th interval,`[breaks(i),breaks(i+1)]`

. That is, the polynomial`coefs(i,1)*(X-breaks(i))^(k-1) + coefs(i,2)*(X-breaks(i))^(k-2) + ... + coefs(i,k-1)*(X-breaks(i)) + coefs(i,k)`

. Notice that`mkpp`

shifts the polynomial in each interval down by`(X-breaks(i))`

.

`pp = mkpp(breaks,coefs,d)`

indicates
that the piecewise polynomial `pp`

is `d`

-vector
valued, i.e., the value of each of its coefficients is a vector of
length `d`

. `breaks`

is an increasing
vector of length `L+1`

. `coefs`

is
a `d`

-by-`L`

-by-`k`

array
with `coefs(r,i,:)`

containing the `k`

coefficients
of the `i`

th polynomial piece of the `r`

th
component of the piecewise polynomial.

Use `ppval`

to evaluate
the piecewise polynomial at specific points. Use `unmkpp`

to extract details of the piecewise
polynomial.

$${c}_{1}{x}^{k-1}+{c}_{2}{x}^{k-2}+\mathrm{...}+{c}_{k-1}x+{c}_{k}$$ It has |

Was this topic helpful?