ape (version 5.7-1)

matexpo: Matrix Exponential

Description

This function computes the exponential of a square matrix using a spectral decomposition.

Usage

matexpo(x)

Value

a numeric matrix of the same dimensions than `x'.

Arguments

x

a square matrix of mode numeric.

Author

Emmanuel Paradis

Examples

Run this code
### a simple rate matrix:
m <- matrix(0.1, 4, 4)
diag(m) <- -0.3
### towards equilibrium:
for (t in c(1, 5, 10, 50)) print(matexpo(m*t))

Run the code above in your browser using DataLab