I need help with an integral
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
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 件のコメント
Roger Stafford
2017 年 1 月 22 日
Which variable are you integrating with respect to, x or t? It makes a lot of difference which one you mean.
Star Strider
2017 年 1 月 22 日
Is ‘x’ a function of ‘t’ = ‘x(t)’?
Mo_B
2017 年 1 月 22 日
回答 (1 件)
Star Strider
2017 年 1 月 22 日
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 件のコメント
Mo_B
2017 年 1 月 22 日
Star Strider
2017 年 1 月 22 日
My pleasure.
If my Answer helped solve your problem, please Accept it!
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!