[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Bspline fitting
From: |
Rhys Ulerich |
Subject: |
Re: [Help-gsl] Bspline fitting |
Date: |
Tue, 2 Feb 2010 10:07:06 -0600 |
> ... starting from the example given at the end of the chapter on
> Basis Splines of the User Guide. What I did not understand is
> the difference between knots and breakpoints....
Are you referring to the usage of knots from the manual page at [1] ?
/* use uniform breakpoints on [0, 15] */
gsl_bspline_knots_uniform(0.0, 15.0, bw);
If so, the definition of both "breakpoints" and "knots" is given at
[2]. For a B-spline basis with the maximum possible continuity (e.g.
k =4 cubic basis in C^2), you can almost think of breakpoints and
knots as the same thing. The distinction becomes important if you
wanted a basis with either nonuniform or lower continuity (e.g. k = 4
cubic basis in C^1) when repeated knots appear at the breakpoints.
> From a more "practical" point
> of view: what shall I do if I want to divide
> the x axis in --for example-- 3 regions, in
> which the experimental data have to be fitted
> by 3rd order polynomials, and let the x positions
> of the border points of these regions being
> introduced by the user?
Three adjacent regions are determined by four breakpoints. So use
gsl_bspline_alloc per [3] with k = 4 cubic and nbreak = 4. Then use
gsl_bspline_knots per [4] where the breakpts parameter is a gsl_vector
of length four containing the four points determining the boundaries
of your three regions. If, instead, you used
gsl_bspline_knots_uniform per [4] then the three regions would be
uniformly spaced.
- Rhys
[1]
http://www.gnu.org/software/gsl/manual/html_node/Example-programs-for-B_002dsplines.html
[2]
http://www.gnu.org/software/gsl/manual/html_node/Overview-of-B_002dsplines.html
[3]
http://www.gnu.org/software/gsl/manual/html_node/Initializing-the-B_002dsplines-solver.html
[4]
http://www.gnu.org/software/gsl/manual/html_node/Constructing-the-knots-vector.html