|
SVdec
|
s= SVdec(a, u, vt)
or s= SVdec(a, u, vt, full=1)
performs the singular value decomposition of the m-by-n matrix A:
A = (U(,+) * SIGMA(+,))(,+) * VT(,+)
where U is an m-by-m orthogonal matrix, VT is an n-by-n orthogonal
matrix, and SIGMA is an m-by-n matrix which is zero except for its
min(m,n) diagonal elements. These diagonal elements are the return
value of the function, S. The returned S is always arranged in
order of descending absolute value. U(,1:min(m,n)) are the left
singular vectors corresponding to the min(m,n) elements of S;
VT(1:min(m,n),) are the right singular vectors. (The original A
matrix maps a right singular vector onto the corresponding left
singular vector, stretched by a factor of the singular value.)
Note that U and VT are strictly outputs; if you don't need them,
they need not be present in the calling sequence.
By default, U will be an m-by-min(m,n) matrix, and V will be
a min(m,n)-by-n matrix (i.e.- only the singular vextors are returned,
not the full orthogonal matrices). Set the FULL keyword to a
non-zero value to get the full m-by-m and n-by-n matrices.
On rare occasions, the routine may fail; if it does, the
first SVinfo values of the returned S are incorrect. Hence,
the external variable SVinfo will be 0 after a successful call
to SVdec. If SVinfo>0, then external SVe contains the superdiagonal
elements of the bidiagonal matrix whose diagonal is the returned
S, and that bidiagonal matrix is equal to (U(+,)*A(+,))(,+) * V(+,).
Numerical Recipes (Press, et. al. Cambridge University Press 1988)
has a good discussion of how to use the SVD -- see section 2.9.
unknown type function, documented at startup/matrix.i line 476
|