How to use the constant e?
Show older comments
So the question is given x =0.2 calculate (x^2) *e^4. I know for pi you just type pi which is just pi in the command. But how do I type e in the command window. Also how to use exponents? Do you just go (x^2) ? Do I need those brackets?
9 Comments
Kenneth Gabriel
on 14 Sep 2016
James Tursa
on 14 Sep 2016
If Star's answer met your needs, please formally Accept it.
Xingyu Xia
on 8 Jul 2019
exp()=e^
x1 = exp(1j*8*pi/7)
DGM
on 22 Oct 2023
Use exp(). It's the same answer that's already been demonstrated several times on this page.
Neliswa
on 18 Apr 2025
when i am using this normal e the code does not work mos, what should i do?
"when i am using this normal e the code does not work mos, what should i do?"
Accepted Answer
More Answers (2)
Harsh
on 18 Oct 2021
6 votes
e=exp
then use bracket
i.e. e^5=exp(5) in matlab
Cai Walsh
on 13 Mar 2022
1 vote
say i needed Vout = VS (1 − e^-T/RC) , how would i write this as ive tried exp(-T/R*C) but wouldt work as theres a negative
1 Comment
T = 2;
R = 5;
C = 7;
y = exp(-T/R*C)
z = exp(-14/5)
Or did you want to divide by the product of R and C?
w = exp(-T/(R*C))
q = exp(-2/35)
Categories
Find more on Exponents and Logarithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!