matexp {complexplus}R Documentation

Matrix Exponential

Description

matexp computes the exponential of a square matrix A i.e. exp(A).

Usage

matexp(A, ...)

Arguments

A

a square matrix, real or complex.

...

arguments passed to or from other methods.

Details

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.

Value

The matrix exponential of A. Method used may be chosen from the options available in expm.

Author(s)

Uffe Høgsbro Thygesen

See Also

expm

Examples

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


[Package complexplus version 2.1 Index]