Learn R Programming

biotools (version 4.3)

raise.matrix: Raising a Square Matrix to a Power

Description

raise.matrix raises a square matrix to a power by using spectral decomposition.

Usage

raise.matrix(x, power = 1)

Value

An object of class "matrix".

Arguments

x

a square matrix.

power

numeric; default is 1.

Author

Anderson Rodrigo da Silva <anderson.agro@hotmail.com>

See Also

Examples

Run this code
m <- matrix(c(1, -2, -2, 4), 2, 2)
raise.matrix(m)
raise.matrix(m, 2)

# End (not run)

Run the code above in your browser using DataLab