Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rnk

Rank of Matrix


Description

Return the rank of a matrix. Not to be confused with the R function rank.

Usage

rnk(G, tol = 1e-14)

Arguments

G

Matrix

tol

machine tolerance for small numbers

Details

Number of singular values greater than tol.

Value

integer, number of non-zero singular values

Note

duplicate the matlab function rank

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

See Also

svd

Examples

hilbert <- function(n) { i <- 1:n; 1 / outer(i - 1, i, "+") }
X <- hilbert(9)[,1:6]
rnk(X)

PEIP

Geophysical Inverse Theory and Optimization

v2.2-3
GPL (>= 2)
Authors
Jonathan M. Lees [aut, cre]
Initial release
2020-08-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.