svd( A, U, S, V) computes the Singular Value Decomposition of A and returns the rank of A. For an m-by-n matrix A, U*S*V' = A, where U is m-by-m orthogonal, S is m-by-n diagonal containing the singular values in decreasing order, and V is n-by-n orthogonal.