matexp {complexplus} | R Documentation |
matexp
computes the exponential of a square matrix A i.e. exp(A)
.
matexp(A, ...)
A |
a square matrix, real or complex. |
... |
arguments passed to or from other methods. |
This function adapts function expm
from package expm
to be able to handle complex matrices, by decomposing the original
matrix into real and purely imaginary matrices and creating a real
block matrix that function expm
can successfully process.
If the original matrix is real, matexp
calls expm
directly for maximum efficiency.
The matrix exponential of A. Method used may be chosen from the options available in expm
.
Uffe HÃ¸gsbro Thygesen
A <- matrix(c(1, 2, 2+3i, 5), ncol = 2) # complex matrix
B <- matrix(1:4, ncol = 2) # real matrix
matexp(A)
matexp(A, "Ward77") # uses Ward77's method in function expm
matexp(B)
matexp(B, "Taylor") # uses Taylor's method in function expm