DocumentationHelp Center
Exponential
Y = exp(X)
example
Y= exp(X)returns the exponentialexfor each element in arrayX. For complex elementsz=x+iy, it returns the complex exponential
Y= exp(X)
Y
X
z
x
iy
e z = e x ( cos y + i sin y ) .
Useexpmto compute a matrix exponential.
expm
collapse all
Calculate the exponential of 1, which is Euler's number,e.
exp(1)
ans = 2.7183
Euler's identity is the equality e i π + 1 = 0 .
Compute the value of e i π .
Y = exp(1i*pi)
Y = -1.0000 + 0.0000i
Plot y = e x / 2 forxvalues in the range [ - 2 , 1 0 ] .
X = -2:0.5:10; Y = exp(X/2); plot(X,Y)
Input array, specified as a scalar, vector, matrix, or multidimensional array.
Data Types:single|doubleComplex Number Support:Yes
single
double
Exponential values, returned as a scalar, vector, matrix, or multidimensional array.
For real values ofXin the interval (-Inf,Inf),Yis in the interval (0,Inf). For complex values ofX,Y是复杂的。The data type ofYis the same as that ofX.
Inf
0
This function fully supports tall arrays. For more information, seeTall Arrays.
This function fully supports GPU arrays. For more information, seeRun MATLAB Functions on a GPU(Parallel Computing Toolbox).
This function fully supports distributed arrays. For more information, seeRun MATLAB Functions with Distributed Arrays(Parallel Computing Toolbox).
expint|expm|expm1|log|log10|mpower|power
expint
expm1
log
log10
mpower
power
A modified version of this example exists on your system. Do you want to open this version instead?
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office
Get trial now