Power of a Matrix

Share:

Description

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

Usage

1
x%^%p

Arguments

x

A square matrix.

p

The power to which the matrix is to be raised.

Value

%^% returns the power of a matrix.

Author(s)

J.K. Lindsey

Examples

1
2
3
4
5
6
7
## Not run: 
x <- matrix(c(0.4,0.6,0.6,0.4),nrow=2)
x%^%2
x%^%10
x%^%20

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.