how to get the exact value?

33 visualizaciones (últimos 30 días)
Jinquan Li
Jinquan Li el 23 de Feb. de 2021
Respondida: KALYAN ACHARJYA el 23 de Feb. de 2021
I'm trying to use numerical Matlab approach tp find the integral of f = 5e^-t , for -1<t<2. Here's the code i tried:
f5 = @(t) 5*exp(-t);
q = integral(f5,-1,2)
The answer is
q =
12.914732726112163
The answer I expect is -5e^(-2)+5e. How can i get the answer in this format?

Respuestas (1)

KALYAN ACHARJYA
KALYAN ACHARJYA el 23 de Feb. de 2021
See the Format
format shortEng

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by