Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

log

Natural logarithm of entries of symbolic matrix

Syntax

Y = log(X)

Description

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

Input Arguments

X

Symbolic variable, expression, function, or matrix

Output Arguments

Y

Number, variable, expression, function, or matrix. If X is a matrix, Y is a matrix of the same size, each entry of which is the logarithm of the corresponding entry of X.

Examples

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 this symbolic expression:

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

See Also

|

Introduced before R2006a

Was this topic helpful?