Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How to use matlab to calculate this sum?

1 Ansicht (letzte 30 Tage)
Chairil Ooi Chi Zen
Chairil Ooi Chi Zen am 10 Aug. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021

Antworten (1)

KSSV
KSSV am 10 Aug. 2020
Bearbeitet: KSSV am 10 Aug. 2020
With loop
N = 1000 ;
thesum = 0 ;
for i = 1:N
thesum = thesum +(1/i+1/((i+2)*(i+3))) ;
end
Without loop
N = 1000 ;
i = 1:N ;
s = 1./i+1./((i+2).*(i+3)) ;
thesum = sum(s) ;
  3 Kommentare
KSSV
KSSV am 10 Aug. 2020
What have you tried? That code will not show any error....it will run.
VBBV
VBBV am 10 Aug. 2020
Bearbeitet: VBBV am 10 Aug. 2020
Yeah. The summation of the series is thesum = 7.8178
Code has no error

Community Treasure Hunt

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

Start Hunting!

Translated by