Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

I need help with an integral

1 visualizzazione (ultimi 30 giorni)
Mo_B
Mo_B il 22 Gen 2017
Chiuso: MATLAB Answer Bot il 20 Ago 2021
Hi guys,
I want to have the following integral in my equation: where 0 is the beginning and t=120 is the ending of the integral, ∫x*(1-e^t), where t is time in seconds.
ytot = 60 * ( 80*22 + 29.7*11 + integral(x*(1-exp(120))))
I hope you understand what I mean,
thanks for your help
  3 Commenti
Star Strider
Star Strider il 22 Gen 2017
Is ‘x’ a function of ‘t’ = ‘x(t)’?
Mo_B
Mo_B il 22 Gen 2017
with respect to x
no x is not a function of t

Risposte (1)

Star Strider
Star Strider il 22 Gen 2017
I’m not certain what you want to do.
Try this:
t = 0:120;
ytot = 60 * ( 80*22 + 29.7*11 + integral(@(x)x*(1-exp(t)), min(t), max(t), 'ArrayValued',1));
  2 Commenti
Mo_B
Mo_B il 22 Gen 2017
yeah I know... I don't know how to say it
it looks way better than what I got. Thanks
Star Strider
Star Strider il 22 Gen 2017
My pleasure.
If my Answer helped solve your problem, please Accept it!

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by