Products & Services Solutions Academia Support User Community Company

Learn more about Spline Toolbox   

newknt - New break distribution

Syntax

newknots = newknt(f,newl)
newknt(f)
[...,distfn] = newknt(...)

Description

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.

The intent is to choose a knot sequence suitable to the fine approximation of a function whose rough approximation in f is assumed to contain enough information about to make this feasible.

newknt(f) uses for newl its default value, namely the number of polynomial pieces in f.

[...,distfn] = newknt(...) also returns, in distfn, the ppform of that piecewise linear monotone function being equidistributed.

Examples

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

spap2(newknt(sp),k,x,y);

For another example, see the last part of the demo "Solving an ODE by Collocation".

Algorithm

This is the Fortran routine NEWNOT in PGS. With the order of the piecewise-polynomial function in pp, the function is approximated by a piecewise constant function obtained by local, discrete, differentiation of the variation of  . The new break sequence is chosen to subdivide the basic interval of the piecewise-polynomial in such a way that

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS