expm

Computes the matrix exponential of a square matrix.

Syntax

  • res = expm(x)

Input argument

  • x - a numeric value: scalar or square matrix (double or single)

Output argument

  • res - a numeric value: a square matrix

Description

expm(x) computes the matrix exponential of x.

The computation is performed by first block-diagonalizing x and then applying a Pade approximation on each block.

Example

A = eye(3, 3);
res = expm(A)
res = expm(A+i)

History

VersionDescription

1.0.0

initial version

Author

Allan CORNET

Last updated