MINFIT(3)

SYNOPSIS
SUBROUTINE MINFIT (NM, M, N, A, W, IP, B, IERR, RV1)

NAME
minfit - Compute the singular value decomposition of a rectangular matrix and solve the related linear least squares problem.

LIBRARY
SLATEC (EISPACK)

CATEGORY
D9

TYPE
SINGLE PRECISION (MINFIT-S)

KEYWORDS
EIGENVALUES, EIGENVECTORS, EISPACK

AUTHOR
Smith, B. T., et al.

DESCRIPTION
This subroutine is a translation of the ALGOL procedure MINFIT, NUM. MATH. 14, 403-420(1970) by Golub and Reinsch. HANDBOOK FOR AUTO. COMP., VOL II-LINEAR ALGEBRA, 134-151(1971). This subroutine determines, towards the solution of the linear T system AX=B, the singular value decomposition A=USV of a real T M by N rectangular matrix, forming U B rather than U. Householder bidiagonalization and a variant of the QR algorithm are used. On INPUT NM must be set to the row dimension of the two-dimensional array parameters, A and B, as declared in the calling program dimension statement. Note that NM must be at least as large as the maximum of M and N. NM is an INTEGER variable. M is the number of rows of A and B. M is an INTEGER variable. N is the number of columns of A and the order of V. N is an INTEGER variable. A contains the rectangular coefficient matrix of the system. A is a two-dimensional REAL array, dimensioned A(NM,N). IP is the number of columns of B. IP can be zero. B contains the constant column matrix of the system if IP is not zero. Otherwise, B is not referenced. B is a two- dimensional REAL array, dimensioned B(NM,IP). On OUTPUT A has been overwritten by the matrix V (orthogonal) of the decomposition in its first N rows and columns. If an error exit is made, the columns of V corresponding to indices of correct singular values should be correct. W contains the N (non-negative) singular values of A (the diagonal elements of S). They are unordered. If an error exit is made, the singular values should be correct for indices IERR+1, IERR+2, ..., N. W is a one-dimensional REAL array, dimensioned W(N). T B has been overwritten by U B. If an error exit is made, T the rows of U B corresponding to indices of correct singular values should be correct. IERR is an INTEGER flag set to Zero for normal return, K if the K-th singular value has not been determined after 30 iterations. The singular values should be correct for indices IERR+1, IERR+2, ..., N. RV1 is a one-dimensional REAL array used for temporary storage, dimensioned RV1(N). Calls PYTHAG(A,B) for sqrt(A**2 + B**2). Questions and comments should be directed to B. S. Garbow, APPLIED MATHEMATICS DIVISION, ARGONNE NATIONAL LABORATORY ------------------------------------------------------------------

REFERENCES
B. T. Smith, J. M. Boyle, J. J. Dongarra, B. S. Garbow, Y. Ikebe, V. C. Klema and C. B. Moler, Matrix Eigen- system Routines - EISPACK Guide, Springer-Verlag, 1976.

ROUTINES CALLED
PYTHAG

REVISION HISTORY (YYMMDD)
760101 DATE WRITTEN
890531 Changed all specific intrinsics to generic. (WRB)
890831 Modified array declarations. (WRB)
890831 REVISION DATE from Version 3.2
891214 Prologue converted to Version 4.0 format. (BAB)
920501 Reformatted the REFERENCES section. (WRB)