| Spline Toolbox | Search  Help Desk |
| fnbrk | Examples See Also |
Syntax
out = fnbrk(f,part)pp = fnbrk (pp,[a b])pp = fnbrk(pp,j)fnbrk(f)
Description
out = fnbrk(f, part) returns the part of the form in f specified by part. These are the parts used when the form was put together, in spmak or ppmak, but also other parts derived from these. In particular, out = fnbrk(f,'form') returns a string indicating the form contained in f.
If the form in f is a B-form, then possible choices for part are: 'knots' or 't', 'coefs', 'number', 'order', 'dim'ension, and 'interval' (returning the knot sequence, the B-spline coefficient sequence, the number of coefficients, the polynomial order, the (vector) dimension of the coefficients, and the basic interval, respectively).
Exactly the same is returned in case f is in BBform.
If the form in f is a ppform, then the possible choices for part are: 'breaks', 'coefs', 'pieces' or 'l', 'order', 'dim'ension, and 'interval' (returning the break sequence, the local polynomial coefficients, the number of polynomial pieces, the polynomial order, the (vector) dimension of the coefficients, and the basic interval, respectively). In addition, in this case, part can also be a 1-by-2 matrix specifying an interval, in which case the output is the ppform of the restriction/extension of the function in f to that interval. Finally, part can also be a positive integer, j, in which case the output is the ppform of the jth polynomial piece of the pp function in f.
If the function in f is multivariate, then the corresponding multivariate parts are returned. This means, e.g., that knots and breaks are cell arrays, the coefficient array is, in general, higher than 2-dimensional, and order, number and pieces are vectors.
If no output is specified, then there should be only one input argument and, in that case, nothing is returned, but a description of the various parts of the form is printed on the screen instead.
Examples
Ifp1 and p2 contain the B-form of two splines of the same order, with the same knot sequence, and the same target dimension, then
p1plusp2 = spmak(fnbrk(p1,'k'),fnbrk(p1,'c')+fnbrk(p2,'c'));
provides the (pointwise) sum of those two functions.
If pp contains the ppform of a bivariate spline with at least 4 polynomial pieces in the first variable, then ppp=fnbrk(pp,{4,[-1 1]}) gives the spline that agrees with the spline in pp on the rectangle [b4 .. b5] x [-1 .. 1] , where b4, b5 are the 4th and 5th point in the break sequence for the first variable.
See Also
ppmak, spmak, ppalldm2, spalldm2