RANK RANK Calculate the Rank of a Matrix

Usage

Returns the rank of a matrix.  There are two ways to use
the rank function is

   y = rank(A,tol)

where tol is the tolerance to use when computing the
rank.  The second form is

   y = rank(A)

in which case the tolerance tol is chosen as

   tol = max(size(A))*max(s)*eps,

where s is the vector of singular values of A.  The
rank is computed using the singular value decomposition svd.
