Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

How to use matlab to calculate this sum?

1 visualizzazione (ultimi 30 giorni)
Chairil Ooi Chi Zen
Chairil Ooi Chi Zen il 10 Ago 2020
Chiuso: MATLAB Answer Bot il 20 Ago 2021

Risposte (1)

KSSV
KSSV il 10 Ago 2020
Modificato: KSSV il 10 Ago 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 Commenti
KSSV
KSSV il 10 Ago 2020
What have you tried? That code will not show any error....it will run.
VBBV
VBBV il 10 Ago 2020
Modificato: VBBV il 10 Ago 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