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)]
A— Input matrix
Input matrix, specified as a square symbolic matrix.
R— Resulting matrix
Resulting function, returned as a symbolic matrix.