VD:
[U,S,V,err] = svd_lapack(A,[],'gesvd')

%%
% Calculate SVD using ZGESDD:
[U,S,V,err] = svd_lapack(A,[],'gesdd')


%% Pseudo inverse
% SVD can be used to find a Pseudo inverse.
% For example,

%%
% Change format:
format short g

%%
% Generate A with sigular values of [1 3 5 7]:
A = randn(7,4)+i*randn(7,4);
[U,S,V] = svd(A,0);
A = U*diag([1 3 5 7])*V'

%%
% Calculate SVD:
[U,S,V,err] = svd_lapack(A,0,'gesdd')

%%
% Find the inverse of singular values:
S_diag = diag(S);
idx_non