sums with for loop
9 ビュー (過去 30 日間)
古いコメントを表示
Alonso Mukendi Kalonji
2022 年 10 月 29 日
コメント済み: Alonso Mukendi Kalonji
2022 年 10 月 30 日
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
0 件のコメント
採用された回答
David Hill
2022 年 10 月 29 日
n=1:502;
s=sum((-1).^(n+1)./(2*n-1))
7 件のコメント
Torsten
2022 年 10 月 29 日
Maybe of interest:
syms n
s = simplify(symsum((-1)^n/(2*n+1),0,Inf))
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!