log

Computes the natural log for each element of x.

Syntax

R = log(x)

Inputs

x
Any valid scalar | vector | matrix
Type: double | integer | logical | struct | cell
Dimension: scalar | vector | matrix

Outputs

R
Type: double
Dimension: matrix, same dimensions as x.

Examples

Simple scalar input:

R = log(12)
R = 2.48491

Simple scalar input:

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