Routine ID: E208 | |
---|---|
Author(s): E. Keil | Library: KERNLIB |
Submitter: B. Schorr | Submitted: 01.12.1969 |
Language: Fortran | Revised: 27.11.1984 |
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: RLSQPM (E201)
Subroutine LSQ fits a polynomial of degree m-1 to n equally-weighted data points ( ). The computed coefficients of the fitted polynomial have values which minimize
For the case m=2 (straight line fit), subroutine LLSQ is faster and easier to use than LSQ.
Meaningful results can usually be obtained only for small values of m (typically less than 10).
Structure:
SUBROUTINE subprograms
User Entry Names: LSQ, LLSQ
Files Referenced: Printer
External References:
RVSUM (F002), RSEQN, DSEQN (F012),
KERMTR (N001), ABEND (Z035)
Usage:
CALL LSQ(N,X,Y,M,A) CALL LLSQ(N,X,Y,A1,A2,IFAIL)
Method:
Normal equations.
Error handling:
Error E208.1:
or
or
(subroutine LSQ). M is replaced by zero.
Error E208.2: The normal equations matrix is numerically singular
(subroutine LSQ).
For each error, a message is printed unless subroutine
KERSET (N001) has been called.
Notes:
On computers other than Cray and CDC double-precision arithmetic is used
internally.