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 ICSNP package in your browser

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

ICSNP documentation built on Sept. 18, 2023, 5:16 p.m.