how to get the exact value?

28 views (last 30 days)
Jinquan Li
Jinquan Li on 23 Feb 2021
Answered: KALYAN ACHARJYA on 23 Feb 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 =
The answer I expect is -5e^(-2)+5e. How can i get the answer in this format?

Answers (1)

KALYAN ACHARJYA on 23 Feb 2021
See the Format
format shortEng

Community Treasure Hunt

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

Start Hunting!

Translated by