Main Content

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 multiplicity k. (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 knot mults times. If mults has exactly as many entries as there are interior knots, then the jth one will appear mults(j) times. Otherwise, the uniform multiplicity mults(1) is used. If knots is strictly increasing, this ensures that the splines of order k with knot sequence augknot satisfy k-mults(j) smoothness conditions across knots(j+1), j=1:length(knots)-2.

[augknot,addl] = augknt(...) also returns the number 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 sequence xi, then augknt([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 is augknt([a,xi,b],4,2).

augknt([1 2 3 3 3],2) returns the vector [1 1 2 3 3], as does augknt([3 2 3 1 3],2). In either case, addl would be 1.