Learn R Programming

rmutil (version 1.1.9)

mpower: Power of a Matrix

Description

%^% calculates x^p for the square matrix, x, by spectral decomposition.

Usage

x%^%p

Value

%^% returns the power of a matrix.

Arguments

x

A square matrix.

p

The power to which the matrix is to be raised.

Author

J.K. Lindsey

Examples

Run this code
if (FALSE) {
x <- matrix(c(0.4,0.6,0.6,0.4),nrow=2)
x%^%2
x%^%10
x%^%20
}

Run the code above in your browser using DataLab