Learn R Programming

MTS (version 1.2.1)

msqrt: Square Root Matrix

Description

Compute the symmetric square root of a positive definite matrix

Usage

msqrt(M)

Arguments

M

A positive definite matrix

Value

mtxsqrt

The square root matrix

invsqrt

The inverse of the square root matrix

Details

Use spectral decomposition to compute the square root of a positive definite matrix

Examples

Run this code
# NOT RUN {
m=matrix(c(1,0.2,0.2,1),2,2)
m1=msqrt(m)
names(m1)
# }

Run the code above in your browser using DataLab