R/rnk.R

Defines functions rnk

Documented in rnk

rnk <-
function(G, tol=1e-14)
  {
    ###  tries to duplicate the matlab function rank
    ###   which returns the number of non-zero singular values
    SV=svd(G);
    return(length(which(SV$d>tol)))
  }

Try the PEIP package in your browser

Any scripts or data that you put into this service are public.

PEIP documentation built on Aug. 21, 2023, 9:10 a.m.