Learn R Programming

mbrdr (version 1.1.1)

matpower: compute the M^power where M is a symmetric matrix.

Description

Returns M^power.

Usage

matpower(M, pow)

Arguments

M

symmetric matrix

pow

power

Value

Returns

Details

The function computes M^power for a symmetric matrix M.

Examples

Run this code
# NOT RUN {
X <- matrix(rnorm(100), c(20,5))
matpower(cov(X), -0.5) ## returns cov(X)^-0.5 %*% cov(X)^-0.5 = cov(X)^-1.
 
# }

Run the code above in your browser using DataLab