| Spline Toolbox | Search  Help Desk |
| splpp, sprpp | Examples |
Convert locally from B-form to ppform
Syntax
[v,b] = splpp(tx,a) [v,b] = sprpp(tx,a)
Description
These are utility M-files of use in the conversion from B-form to ppform (and in certain evaluations), but of no interest to the casual user. Each rowa(.,:) of a is taken to contain the B-coefficients of some spline s (and its order k is taken to be the column number of a). In splpp, the polynomial piece associated with the knot interval [tx(.,k-1)..tx(.,k)] is focused on. Repeated knot insertion (of the knot 0) is used to derive from the given information the B-spline coefficients b(.,1:k) for the same polynomial, relevant for the interval [tx(.,k-1)..0] (with respect to the knot sequence [tx(.,1:k-1),0,. . .,0]).
From this, the numbers v(j) := Dk-j s(0-)/(k- j)!, j = 1, ..., k are computed, for each of the splines s described by the given knots tx(.,:) and coefficients a(.,:).
The M-file sprpp carries out exactly the same job, but for the interval [0..tx(.,k)], and therefore ends up with the values v(j) :=Dk-j s(0+)/(k- j)!, j = 1, ..., k.
Examples
The statement[v,b]=splpp([-2 -1 0 1],[0 1 0]) provides the sequence
v = -1.0000 -1.0000 0.5000 = D2s(0-)/2, Ds(0-), s(0-)
with s the B-spline with knots -2, -1, 0, 1. This is so because the l in splpp indicates the limit from the left, and the second argument, [0 1 0], indicates that the spline s in question be
i.e., this particular linear combination of the third-order B-splines for the knot sequence ..., -2, -1,0,1,... (Note that the values calculated do not depend on the knots marked ?.) The above statement also provides the sequence b = 0 1.0000 0.5000 of B-spline coefficients for the polynomial piece of s on the interval [-1. .0], and with respect to the knot sequence ?, -2, -1, 0, 0, ?.
The statement [v,b]=sprpp([-1 0 1 2],[1 0 0]) provides the sequence
v = 0.5000 -1.0000 0.5000 = D2s(0+)/2, Ds(0+), s(0+)
with s the B-spline with knots ?,-1,0,1. Its polynomial piece on the intervalb = 0.5000 0 0 also provided states that, on the interval [0. .1], the B-spline B(·|[?, -1,0,1]) can be written

Cautionary Note
It is assumed thattx(.,k-1) < 0
tx(.,k) for splpp and tx(.,k-1)
0 < tx(.,k) for sprpp.