% rank of a nearly rank deficient matrix A
% S(2,2) is nearly zero
% rank(A) is 1 if threshold is 0.0001.
% K. Ming Leung, 04/26/03

A = [0.913 0.659
        0.780 0.563
        0.457 0.330 ];
[U, S, V] = svd(A),