next up previous index
Next: E406 Chebyshev Series Up: CERNLIB Previous: E250 Least-Squares Fit

E255 Least-Squares Fit to Parabola

Routine ID: E255
Author(s): H. GroteLibrary: MATHLIB
Submitter: M. MetcalfSubmitted: 01.05.77
Language: FortranRevised:

OBSOLETE

Please note that this routine has been obsoleted in CNL 218. Users are advised not to use it any longer and to replace it in older programs. No maintenance for it will take place and it will eventually disappear.
Suggested replacement: RLSQP2 (E201)

Given a vector of values Y measured at the points X, PARLSQ finds the best least-squares fit to the parabola Y=c1+c2x+c3x2 .

Structure:

SUBROUTINE subprogram
User Entry Names: PARLSQ

Usage:

    CALL PARLSQ(X,Y,L,C,VAR)
X
( REAL) Vector of abscissae.
Y
( REAL) Vector of values corresponding to points X.
L
( INTEGER) Length of vectors X and Y.
C
( REAL) Array of dimension 3 in the calling program. On exit, it contains the coefficients c1,c2,c3 .
VAR
( REAL) Residual sum of squares divided by L-3 .

Notes:

If L < 3 , C and VAR are set to zero.

References:

  1. D.H. Menzel, Fundamental Formulas of Physics, Dover Publ., New York (1960) 122

E406


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995