Learn R Programming

Biodem (version 0.5)

mtx.exp: Calculates the n-th power of a matrix

Description

Calculates the n-th power of a matrix.

Usage

mtx.exp(X, n)

Arguments

X

a square matrix

n

the exponential value

Value

Takes a matrix and returns a matrix.

Details

This function calculates (efficiently!) the n-th power of a matrix.

References

...

Examples

Run this code
# NOT RUN {
test<-matrix(c(1:16), 4,4)
pow.test<-mtx.exp(test,10)
pow.test
# }

Run the code above in your browser using DataLab