Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

please help me, how do I make the code for the equation in the following picture?

1 vue (au cours des 30 derniers jours)
Muhammad Rohim
Muhammad Rohim le 17 Avr 2020
Clôturé : MATLAB Answer Bot le 20 Août 2021
  3 commentaires
darova
darova le 17 Avr 2020
You can use 200 percent scale for the picture if you want

Réponses (1)

Peter O
Peter O le 17 Avr 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 commentaires
Muhammad Rohim
Muhammad Rohim le 17 Avr 2020
Thank you very much. It ia work.
Ameer Hamza
Ameer Hamza le 21 Avr 2020
"You can't code an infinite sum exactly"
Peter, I think you meant the opposite.

Tags

Aucun tag saisi pour le moment.

Produits


Version

R2013a

Community Treasure Hunt

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

Start Hunting!

Translated by