Contents Previous Next Subchapters

Natural Logarithm Function
Syntax log(value)
See Also exp , log10 , log2

Description
Returns the element-by-element natural logarithm of value, where value is a real, double-precision matrix, or complex matrix. If value is a real or double-precision matrix, its elements cannot be negative.

Example
     log(1.0)
returns
     0
If value is a complex number, the imaginary part of the result is between -pi and pi.
     log([-1r0 + 1i0, -1r0 - 1i0])
returns
     [ (0.346574,2.35619) , (0.346574,-2.35619) ]