%
%  playing with svd
%
  H = [-0.2042 0.0559 0.3715 -0.2077; 0.1347 0.2208 0.5294 0.1336;
        0.4802 0.3889 0.6862 0.4670; 0.6078 0.6088 1.2159 0.6081]
 %
 [U,S,V] = svd(H);
 %
 %  plot the singular values
 %
 %  plot(diag(S),'d'); grid;
 %
 %  compute for forward solution
 %
   x = [1;2;3;4];
 %
   y = H*x
 %
 %  compute the noise free inverse
 %
   x = inv(H)*y
 %
 %  determine the signal to noise ratio in dB
 %
   SNR = 1000;
 %
 %  get the square root of the power in y
 %
   sy = norm(y);
 %
 % determine the noise standard deviation
 %
   sn = sy*10^(-SNR/20);
 %
 %  get the noisey y values
 %
   y_noise =  sn*randn(size(y));
 % 
 %  check SNR
 %
   SNR = 20*log10(norm(y)/norm(y_noise))
 %
 %  estimate x
 %
   x = inv(H)*(y+y_noise)
   x = pinv(H,1e-6)*(y+y_noise)