New break distribution
newknots = newknt(f,newl)
[...,distfn] = newknt(...)
newknots = newknt(f,newl) returns the knot sequence whose interior knots cut the basic interval of f into newl pieces, in such a way that a certain piecewise linear monotone function related to the high derivative of f is equidistributed.
If the error in the least-squares approximation sp to some data x,y by a spline of order k seems uneven, you might try for a more equitable distribution of knots by using
For another example, see the last part of the example "Solving an ODE by Collocation".
This is the Fortran routine NEWNOT in PGS. With k the order of the piecewise-polynomial function f in pp, the function |Dkf| is approximated by a piecewise constant function obtained by local, discrete, differentiation of the variation of Dk–1f. The new break sequence is chosen to subdivide the basic interval of the piecewise-polynomial f in such a way that