Construction
A piecewise-polynomial
is usually constructed by some command, through a process of interpolation
or approximation, or conversion from some other form e.g., from the
B-form, and is output as a variable. But it is also possible to make
one up from scratch, using the statement
pp
= ppmak(breaks,coefs)
For example, we might say pp=ppmak(-5:-1,-22:-11),
or, more explicitly,
breaks = -5:-1;
coefs = -22:-11; pp = ppmak(breaks,coefs);
thus supplying the uniform break sequence
-5:-1 and the coefficient sequence
-22:-11. Since this break sequence
has 5 entries, hence 4 break intervals, while the coefficient sequence
has 12 entries, we have, in effect, specified a piecewise-polynomial
of order 3 (= 12/4). The command
fnbrk(pp)
prints out all the constituent parts of this piecewise-polynomial,
as follows:
breaks(1:l+1)
-5 -4 -3 -2 -1 coefficients(d*l,k) -22 -21 -20 -19 -18
-17 -16 -15 -14 -13 -12 -11 pieces number l 4 order k
3 dimension d of target 1 Further, fnbrk can be used to supply each
of these parts separately. But the point of Spline Toolbox is
that you usually need not concern yourself with these details. You
simply use pp as an argument to commands that evaluate,
differentiate, integrate, convert, or plot the piecewise-polynomial
whose description is contained in pp.
 | ppform | | Available Commands |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit