This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Provide knot averages


tstar = aveknt(t,k)


tstar = aveknt(t,k) returns the averages of successive k-1 knots, i.e., the sites

ti*:=(ti+1++ti+k1)/(k1),   i=1:n

which are recommended as good interpolation site choices when interpolating from splines of order k with knot sequence t=(ti)i=1n+k.


aveknt([1 2 3 3 3],3) returns the vector [2.5000 3.0000], while aveknt([1 2 3],3) returns the empty vector.

With k and the strictly increasing sequence breaks given, the statements

t = augknt(breaks,k); x = aveknt(t);
sp = spapi(t,x,sin(x));

provide a spline interpolant to the sine function on the interval [breaks(1)..breaks(end)].

For sp the B-form of a scalar-valued univariate spline function, and with tstar and a computed as

tstar = aveknt(fnbrk(sp,'knots'),fnbrk(sp,'order'));
a = fnbrk(sp,'coefs');

the points (tstar(i), a(i)) constitute the control points of the spline, i.e., the vertices of the spline's control polygon.

See Also

| |