rank
Compute the rank of matrix A.
Syntax
R = rank(A)
R = rank(A, tol)
Inputs
- A
 - The matrix whose rank is computed.
 - tol
 - A threshold for rounding off near-zero singular values. The default is the product of max(size(A)), the largest singular value, and eps.
 
Outputs
- R
 - The rank.
 
Examples
R = rank([1,2,3;4,5,6;7,8,9.1])R = 3R = rank([1,2,3;4,5,6;7,8,9.1], 0.02)R = 2