Documentation Center |
Natural logarithm
Y = log(X)
The log function operates element-wise on arrays. Its domain includes complex and negative numbers, which may lead to unexpected results if used unintentionally.
Y = log(X) returns the natural logarithm of the elements of X. For complex or negative z where z = x + y*i, the complex logarithm is returned.
log(z) = log(abs(z)) + i*atan2(y,x)