Main Content

logm

Matrix logarithm

Description

example

R = logm(A) computes the matrix logarithm of the square matrix A.

Examples

Matrix Logarithm

Compute the matrix logarithm for the 2-by-2 matrix.

syms x
A = [x 1; 0 -x];
logm(A)
ans =
[ log(x), log(x)/(2*x) - log(-x)/(2*x)]
[      0,                      log(-x)]

Input Arguments

collapse all

Input matrix, specified as a square symbolic matrix.

Output Arguments

collapse all

Resulting function, returned as a symbolic matrix.

Version History

Introduced in R2014b

See Also

| | | |