pinv
Compute the matrix pseudo-inverse.
Syntax
R = pinv(A)
R = pinv(A, tol)
Inputs
- A
 - The matrix to pseudo-invert.
 - tol
 - Singular values less than this value are zeroed in the inversion.
 
Outputs
- R
 - The pseudo-inverse.
 
Example
R = pinv([1, 2; 3, 5; 4, 8])
      R = [Matrix] 2 x 3
-0.29412   2.00000  -1.17647
 0.17647  -1.00000   0.70588