This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.





Y = exp(X) returns the exponential ex for each element in array X. For complex elements z = x + iy, it returns the complex exponential


Use expm to compute a matrix exponential.


collapse all

Calculate the exponential of 1, which is Euler's number, e.

ans =


Euler's identity is the equality $e^{i \pi} +1=0$.

Compute the value of $e^{i \pi}$.

Y = exp(1i*pi)
Y =

  -1.0000 + 0.0000i

Plot $y=e^{x/2}$ for x values in the range $[-2,10]$.

X = -2:0.5:10;
Y = exp(X/2);

Input Arguments

collapse all

Input array, specified as a scalar, vector, matrix, or multidimensional array.

Data Types: single | double
Complex Number Support: Yes

Output Arguments

collapse all

Exponential values, returned as a scalar, vector, matrix, or multidimensional array.

For real values of X in the interval (-Inf, Inf), Y is in the interval (0,Inf). For complex values of X, Y is complex. The data type of Y is the same as that of X.

More About

collapse all

Tall Array Support

This function fully supports tall arrays. For more information, see Tall Arrays.

See Also

| | | | | |

Introduced before R2006a

Was this topic helpful?