mtx.exp {Biodem} | R Documentation |
Calculates the n-th power of a matrix.
mtx.exp(X, n)
X |
a square matrix |
n |
the exponential value |
This function calculates (efficiently!) the n-th power of a matrix.
Takes a matrix and returns a matrix.
Original code by VCC "beautyfied" by MM
Vincente Canto Cassola and Martin Maechler
...
test<-matrix(c(1:16), 4,4) pow.test<-mtx.exp(test,10) pow.test