How to use the constant e?

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 Commenti

Kenneth Gabriel
Kenneth Gabriel il 14 Set 2016
sweet thx
James Tursa
James Tursa il 14 Set 2016
If Star's answer met your needs, please formally Accept it.
Xingyu Xia
Xingyu Xia il 8 Lug 2019
exp()=e^
Abdalla
Abdalla il 19 Set 2022
Spostato: Voss il 19 Set 2022
x1 = 𝑒𝑗8𝜋/7
x1 = exp(1j*8*pi/7)
x1 = -0.9010 - 0.4339i
Jeeimy
Jeeimy il 22 Ott 2023
Spostato: DGM il 22 Ott 2023
Y=e^(1.2*t)
DGM
DGM il 22 Ott 2023
Use exp(). It's the same answer that's already been demonstrated several times on this page.
Neliswa
Neliswa il 18 Apr 2025
when i am using this normal e the code does not work mos, what should i do?
Stephen23
Stephen23 il 18 Apr 2025
Modificato: Stephen23 il 18 Apr 2025
"when i am using this normal e the code does not work mos, what should i do?"

Accedi per commentare.

 Risposta accettata

Star Strider
Star Strider il 18 Apr 2023
Modificato: MathWorks Support Team il 18 Apr 2023
Use the exponential function exp(y) to compute e^y. For example: 
x = 0.2;
Result = (x^2)*exp(4)
Result =
2.1839

Più risposte (2)

Harsh
Harsh il 18 Ott 2021

6 voti

e=exp
then use bracket
i.e. e^5=exp(5) in matlab
Cai Walsh
Cai Walsh il 13 Mar 2022

1 voto

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 Commento

T = 2;
R = 5;
C = 7;
y = exp(-T/R*C)
y = 0.0608
z = exp(-14/5)
z = 0.0608
Or did you want to divide by the product of R and C?
w = exp(-T/(R*C))
w = 0.9445
q = exp(-2/35)
q = 0.9445

Accedi per commentare.

Categorie

Tag

Non è stata ancora inserito alcun tag.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by