125i


err =

   7.4966e-16

</pre><p>Find the inverse of singular values:</p><pre class="codeinput">S_diag = diag(S);
idx_non_zero_S_diag = (S_diag ~= 0);
S_diag_inv = S_diag;
S_diag_inv(idx_non_zero_S_diag) = S_diag_inv(idx_non_zero_S_diag).^(-1);
S_inv = [diag(S_diag_inv); zeros(size(S,2)-size(S,1),size(S,1))]
</pre><pre class="codeoutput">
S_inv =

      0.14286            0            0            0
            0          0.2            0            0
            0            0      0.33333            