How to take integral with for loop?

5 ビュー (過去 30 日間)
Arya Akhtar
Arya Akhtar 2021 年 5 月 24 日
コメント済み: Arya Akhtar 2021 年 5 月 25 日
Hello,
I would like to integrate my function with for loop.
for l = 1: length(x)-1
final(l) = (upper(i+1)-upper(i)).*(w(2)-w(1)) ;
end
where x is my function and l is my time. i cannot have desired output. how can i do that?

採用された回答

Alan Stevens
Alan Stevens 2021 年 5 月 25 日
Add the command
I = sum(final);
after the loop.
  1 件のコメント
Arya Akhtar
Arya Akhtar 2021 年 5 月 25 日
Thank you sir!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumerical Integration and Differentiation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by