exp

Exponential function.

Syntax

exp(expr)

Argument

expr
A valid scalar or vector expression.

Example

Templex Expression Result
{exp(0)} 1
{exp( {-1, 0, 1} )} {0.367879, 1, 2.71828}
{exp( { {2, 2}, {4, 8} } )} {7.38906, 7.38906}, {54.5982, 2980.96}

Comments

The exp function raises the natural logarithm (base e) to a power.

If expr is a scalar, the result is a scalar which is the exponential function of expr

If expr is a vector, the result is a vector of the same dimensions containing the values of the exponential function of each element in expr.

If expr is a matrix, the result is a matrix of the same dimensions containing the values of the exponential function of each element in expr.