R/mat.sqrt.R

Defines functions `mat.sqrt`

### function to compute a symmetric square root of a matrix
### internal function
###

`mat.sqrt` <-
function(A) 
    {
    eigen.A<-eigen(A)
    sqrt.A<-eigen.A$vectors %*% tcrossprod(diag(eigen.A$values^0.5), eigen.A$vectors)
    return(sqrt.A)
    }

Try the ICS package in your browser

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

ICS documentation built on Sept. 21, 2023, 9:07 a.m.