www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/SmallestNonzeroSingularValuesExample.m

    %% Smallest Nonzero Singular Values
% Create a sparse 100-by-100 Neumann matrix.
C = gallery('neumann',100);

%% 
% Compute the ten smallest singular values.
ss = svds(C,10,'smallest')

%%
% Compute the 10 smallest nonzero singular values. Since the matrix has a
% singlular value that is equal to zero, the |'smallestnz'| option omits
% it.
snz = svds(C,10,'smallestnz')