Exponential - MATLAB Exp
Exponential - MATLAB Exp
exp
Exponential Syntax
Y=e x p ( X )
example
Description
Y=e x p ( X )returns the exponential for each element of array X . The function accepts both real and complex inputs. For real values of Xin the interval (-Inf, Inf), e x preturns real values in the interval (0,Inf). For complex values of X ,e x preturns complex values.
example
Examples
Calculate Scalar Exponential Values
Examine several common values of the exponential function. Calculate the exponential of 0. e x p ( 0 ) a n s= 1 The result is 1, w hich is the y-intercept of the e x pfunction. Calculate the exponential of 1. e x p ( 1 ) a n s= 2 . 7 1 8 3 The result is equal to Euler's number, e. Calculate the exponential of i. e x p ( 1 i * p i ) a n s= 1 . 0 0 0 0+0 . 0 0 0 0 i The result of -1 is due to Euler's famous formula
collapse all
4/9/2014
The result is a vector of exponential values. Plot the function values. p l o t ( X , Y , ' L i n e W i d t h ' , 1 . 5 ) g r i do n ; t i t l e ( ' R e a l V a l u e dE x p o n e n t i a lF u n c t i o n ' ) ; x l a b e l ( ' X ' ) ;y l a b e l ( ' Y ' ) ;
http://www.mathworks.com/help/matlab/ref/exp.html
2/5
4/9/2014
The real-valued exponential function maps values in the domain of all real numbers to the range of
http://www.mathworks.com/help/matlab/ref/exp.html
3/5
4/9/2014
e x pis a continuous function on the complex plane. Plot the real portion of the function in the same figure. s u r f ( X , Y , r e a l ( Z ) ) v i e w ( 6 3 , 1 4 )
http://www.mathworks.com/help/matlab/ref/exp.html
4/5
4/9/2014
In this plot, the real and complex portions of the function are 90 degrees out of phase. Analytically, this is because the real portion depends on c o s , w hereas the complex portion depends on s i n .
Input Arguments
X Input array scalar | vector | matrix | multidimensional array
expand all
More About
Algorithms
For complex inputs z = x + 1 i * y , the e x pfunction calculates the complex exponential e x p ( x ) . * ( c o s ( y )+ 1 i * s i n ( y ) ) .
collapse all
See Also
e x p i n t| e x p m| e x p m 1| l o g| l o g 1 0| m p o w e r| p o w e r
http://www.mathworks.com/help/matlab/ref/exp.html
5/5