Main Content

log

Natural logarithm of entries of symbolic matrix

Description

example

Y = log(X) returns the natural logarithm of X.

Examples

Compute Natural Logarithm

Compute the natural logarithm of each entry of this symbolic matrix:

syms x
M = x*hilb(2);
log(M)
ans =
[   log(x), log(x/2)]
[ log(x/2), log(x/3)]

Differentiate Symbolic Expression

Differentiate this symbolic expression:

syms x
diff(log(x^3), x)
ans =
3/x

Input Arguments

collapse all

Input, specified as a number, vector, matrix, or array, or a symbolic number, variable, array, function, or expression.

See Also

|

Introduced before R2006a