Solution Vector from SVD
A $\cdot $x = b 
where:
A  is a given $m$ (rows) $\times n$ (columns) matrix, where $m\ge n$  
x  is the $n$vector we wish to find, and  
b  is a given $m$vector 
by means of the Singular Value Decomposition method (SVD).
CALL sla_SVDSOL (M, N, MP, NP, B, U, W, V, WORK, X)
M,N  I  $m$, $n$, the numbers of rows and columns in matrix A 
 
MP,NP  I  physical dimensions of array containing matrix A 
 
B  D(M)  known vector b 
 
U  D(MP,NP)  array containing $m\times n$ matrix U 


W  D(N)  $n\times n$ diagonal matrix W (diagonal elements only) 


V  D(NP,NP)  array containing $n\times n$ orthogonal matrix V 
WORK  D(N)  workspace 


X  D(N)  unknown vector x 
A = U $\cdot $W $\cdot $V${}^{T}$ 
where:
A  is any $m$ (rows) $\times n$ (columns) matrix, where $m>n$  
U  is an $m\times n$ columnorthogonal matrix  
W  is an $n\times n$ diagonal matrix with ${w}_{ii}\ge 0$  
V${}^{T}$  is the transpose of an $n\times n$ orthogonal matrix 
Note that $m$ and $n$ are the logical dimensions of the matrices and vectors concerned, which can be located in arrays of larger physical dimensions MP and NP. The solution is then found from the expression:
x = V $\cdot \phantom{\rule{1em}{0ex}}[diag(1/$W${}_{j}\left)\right]\cdot ($U${}^{T}\cdot $b) 