Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
please help me, how do I make the code for the equation in the following picture?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/285410/image.png)
3 Kommentare
Antworten (1)
Peter O
am 17 Apr. 2020
You can't code an infinite sum exactly, but fortunately, this one is bounded (x^2 on the denominator and the numerator is bounded between -1 and 1).
Pick a big n:
n_max=100;
ns = 1:n_max;
sum_n = cumsum( sin(2*ns)./ns.^2);
plot(ns, sum_n)
You will see it very quickly converges, after 20 terms or so.
5 Kommentare
Ameer Hamza
am 21 Apr. 2020
"You can't code an infinite sum exactly"
Peter, I think you meant the opposite.
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!