augknt
Augment knot sequence
Syntax
augknt(knots,k)
augknt(knots,k,mults)[augknot,addl] = augknt(...)
Description
augknt(knots,k)
returns a nondecreasing and augmented knot sequence that has the first and last knot with exact multiplicityk
. (This may actually shorten the knot sequence.) )
augknt(knots,k,mults)
makes sure that the augmented knot sequence returned will, in addition, contain each interior knotmults
times. Ifmults
has exactly as many entries as there are interior knots, then thejth one will appearmults(j)
times. Otherwise, the uniform multiplicitymults(1)
is used. Ifknots
is strictly increasing, this ensures that the splines of orderk
with knot sequenceaugknot
satisfyk-mults(j)
smoothness conditions acrossknots(j+1)
,j=1:length(knots)-2
.
also returns the number[augknot,addl] = augknt(...)
addl
of knots added on the left. (This number may be negative.)
Examples
If you want to construct a cubic spline on the interval [a..b
], with two continuous derivatives, and with the interior break sequencexi
, thenaugknt([a,b,xi],4)
is the knot sequence you should use.
If you want to use Hermite cubics instead, i.e., a cubic spline with only one continuous derivative, then the appropriate knot sequence isaugknt([a,xi,b],4,2).
augknt([1 2 3 3 3],2)
returns the vector[1 1 2 3 3]
, as doesaugknt([3 2 3 1 3],2)
. In either case,addl
would be1
.