R/sqrt_mat.R

sqrt_mat <-
function(x)
{
  aa=eigen(x)
  ee=aa[[1]]
  res=aa[[2]]%*%diag(sqrt(ee))%*%t(aa[[2]])
  return(res)
}

Try the SPREDA package in your browser

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

SPREDA documentation built on May 2, 2019, 4 p.m.