フィルターのクリア

sums with for loop

3 ビュー (過去 30 日間)
Alonso Mukendi Kalonji
Alonso Mukendi Kalonji 2022 年 10 月 29 日
I am beginner in matlab, and i struggly to resolve some exercice. can I have some advice according to this task?
1-1/3+1/5-1/7+1/9-..-1/1003

採用された回答

David Hill
David Hill 2022 年 10 月 29 日
n=1:502;
s=sum((-1).^(n+1)./(2*n-1))
s = 0.7849
  7 件のコメント
Torsten
Torsten 2022 年 10 月 29 日
Maybe of interest:
syms n
s = simplify(symsum((-1)^n/(2*n+1),0,Inf))
s = 
Alonso Mukendi Kalonji
Alonso Mukendi Kalonji 2022 年 10 月 30 日
I get it!
Thank you very much!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFunction Creation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by