Spline Toolbox | ![]() ![]() |
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
or rsmak
or spmak
, 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. Exactly the same is returned in case f
is in rBform, except that the dimension returned is that of the target of the function, hence it is one less than the (vector) dimension of the coefficients.
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). The string 'guide'
also elicits the coefficients, but in the form needed for PPVALU
in PGS. Finally, part can also be a positive integer, j
, in which case the output is the ppform of the jth polynomial piece of the piecewise-polynomial function in f
.
Exactly the same is returned in case f
is in rpform, except that the dimension returned is that of the target of the function, hence it is one less than the (vector) dimension of the coefficients.
Finally, for any form, part can also be a 1-by-2 matrix specifying an interval, in which case the output is the restriction/extension of the function in f
to that interval and in the same form.
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 two-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
If p1
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 four 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 entry in the break sequence for the first variable.
See Also
ppmak
, spmak
, ppalldem
, spalldem
![]() | fn2fm | fncmb | ![]() |