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.
An n -column, m -row orthogonal array used in the decomposition of A . Normally, U is returned from the SVDC procedure.
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.
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:
A = [[1.0, 2.0, -1.0, 2.5], $ ; Define the array A.
B = [0.0, 1.0, 5.3, -2.0, 6.3, 3.8] ; Define the right-hand side vector B.
SVDC, A, W, U, V ; Decompose A.
PRINT, SVSOL(U, W, V, B) ; Compute the solution and print the result.