log

Computes the natural log for each element of x.

Syntax

R = log(x)

Inputs

x
Type: double | complex
Dimension: scalar | vector | matrix

Outputs

R
The returned values.
Type: double | complex
Dimension: scalar | vector | matrix.

Examples

Scalar input:

R = log(12)
R = 2.48491

Matrix input:

R = log([2 e; 32 exp(5)])
R = [ 0.693147 1; 3.46574 5 ]