SVSOL
Syntax | Return Value | Arguments | Keywords | Examples | Version History | See Also
The SVSOL function uses "back-substitution" to solve a set of simultaneous linear equations Ax = b, given the U, W, and V arrays returned by the SVDC procedure. None of the input arguments are modified, making it possible to call SVSOL multiple times with different right hand vectors, B.
SVSOL is based on the routine svbksb described in section 2.6 of Numerical Recipes in C: The Art of Scientific Computing (Second Edition), published by Cambridge University Press, and is used by permission.
Syntax
Result = SVSOL( U, W, V, B [, /COLUMN] [, /DOUBLE] )
Return Value
Returns the solution to the linear system using decomposition and back substitution.
Arguments
U
An n-column, m-row orthogonal array used in the decomposition of A. Normally, U is returned from the SVDC procedure.
W
An n-element vector containing "singular values." Normally, W is returned from the SVDC procedure. Small values (close to machine floating-point precision) should be set to zero prior to calling SVSOL.
V
An n-column, n-row orthogonal array used in the decomposition of A. Normally, V is returned from the SVDC procedure.
B
An m-element vector containing the right hand side of the linear system Ax = b.
Keywords
COLUMN
Set this keyword if the input arrays U and V are in column-major format (composed of column vectors) rather than in row-major format (composed of row vectors).
DOUBLE
Set this keyword to force the computation to be done in double-precision arithmetic.
Examples
To solve the linear system Ax = b using Singular-value decomposition and back substitution, begin with an array A which serves as the coefficient array:
IDL prints:
This is the correct solution.
Version History
See Also
CRAMER, GS_ITER, LU_COMPLEX, CHOLSOL, LUSOL, SVDC, TRISOL