log

log(X) calculates the natural logarithm for each element of X.

Examples

> X = [ -1 0 1 10]

> log(X)

	0+3.14159i		-Inf		0		2.30259
> x = 0:0.2:10

[x:1x51 double]

> plot(x, log(x))

[ans:1x1 struct]

Resources

See also

log10 | log1p | log2