Uses "back substitution" to solve the set of simultaneous linear equations Ax = b, given the u, w, and v arrays created by the SVD procedure from the matrix a.
w The vector of singular values, as returned by SVD.
v The n-by-n orthogonal matrix of the decomposition of A, as returned by SVD.
b The vector containing the right-hand side of the equation.
SVD, A, w, u, v
A
.
small = WHERE(w LT MAX(w) * 1.0e-6, count)
IF count NE 0 THEN w(small) = 0.0
SVBKSB, u, w, v, b, x
x
now contains the solution.
PRINT, TOTAL(ABS(A # x - b))