# 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 scalar threshold for rounding off near zero singular values. The
default is the largest dimension mulitiplied by eps(s),
where
`s`is the largest singular value.

## Outputs

- R
- The rank.

## Examples

`R = rank([1,2,3;4,5,6;7,8,9.1])`

`R = 3`

`R = rank([1,2,3;4,5,6;7,8,9.1], 0.02)`

`R = 2`