R/matrix.sqrt.R

Defines functions matrix.sqrt

Documented in matrix.sqrt

matrix.sqrt <-
function(A)
{
   sva <- svd(A)
    if (min(sva$d)>=0)
       Asqrt <- t(sva$v %*% (t(sva$u) * sqrt(sva$d)))
    else
       stop("Matrix square root is not defined")
    return(Asqrt)
}

Try the skewMLRM package in your browser

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

skewMLRM documentation built on Nov. 24, 2021, 9:07 a.m.