R/positive.svd.R

Defines functions positive.svd

Documented in positive.svd

positive.svd <-
function(m, tol)
{
  s = svd(m)
  
  if( missing(tol) ) 
      tol = max(dim(m))*max(s$d)*.Machine$double.eps
  Positive = s$d > tol

  return(list(
      d=s$d[Positive],
      u=s$u[, Positive, drop=FALSE],
      v=s$v[, Positive, drop=FALSE]
      ))
}

Try the ARTIVA package in your browser

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

ARTIVA documentation built on May 1, 2019, 6:31 p.m.