sums with for loop
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Alonso Mukendi Kalonji
il 29 Ott 2022
Commentato: Alonso Mukendi Kalonji
il 30 Ott 2022
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 Commenti
Risposta accettata
David Hill
il 29 Ott 2022
n=1:502;
s=sum((-1).^(n+1)./(2*n-1))
7 Commenti
Torsten
il 29 Ott 2022
Maybe of interest:
syms n
s = simplify(symsum((-1)^n/(2*n+1),0,Inf))
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Function Creation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!