Elsevier Science Home
Computer Physics Communications Program Library
Full text online from Science Direct
Programs in Physics & Physical Chemistry
CPC Home

[Licence| Download | New Version Template] aapa_v1_0.gz(5 Kbytes)
Manuscript Title: A subroutine for approximation by cubic splines in the least squares sense.
Authors: J. Bok
Program title: BELLS
Catalogue identifier: AAPA_v1_0
Distribution format: gz
Journal reference: Comput. Phys. Commun. 16(1978)113
Programming language: Fortran.
Operating system: RTE-III.
RAM: 26K words
Word size: 16
Peripherals: graph plotter.
Keywords: General purpose, Curve, Fitting, Least squares, Cubic splines.
Classification: 4.9.

Nature of problem:
The subroutine computes the approximation to the experimental data points, not necessarily equidistant, by a sum of the cubic bell spline, functions in the least squares sense.

Solution method:
A system of linear equations with a band matrix is solved by Gaussian elimination.

Present dimensions limit to 500 data points and the approximation up to 100 cubic splines, these limits may be changed by redimensioning.

Unusual features:
1) The approximation can be found in an arbitrary interval <XA,XB> which is the part of <X(1), X(NP)> where X(1) and X(NP) are abscissae of the first and the last of the given experimental points. To a small extent (defined later) there is also a possibility to extrapolate beyond <X(1), X(NP)>.
2) It is highly recommended to use the plotter for an immediate plotting of the result curve because there is no objective criterion for the determining of the optimum number of splines for the fitting. The right choice can be judged by knowing the physical nature of the problem, by the expected smoothness of the approximation, etc.

Running time:
On the 21 MX computer the compilation takes about 70 s, while a typical 20 splines fit to 100 points takes about 5 s.