Y = log(X)
logis an elementary function that operates element-wise on matrices. Its domain includes complex numbers, which can lead to unexpected results if used unintentionally.
log(X) is the natural logarithm of the elements of
X. For complex or negative z, where z
+ y*i, the complex logarithm is returned:
log(-1)is a clever way to generate
0.0000 + 3.1416i
(c) Copyright 1994 by The MathWorks, Inc.