Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to use matlab to calculate this sum?

1 回表示 (過去 30 日間)
Chairil Ooi Chi Zen
Chairil Ooi Chi Zen 2020 年 8 月 10 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日

回答 (1 件)

KSSV
KSSV 2020 年 8 月 10 日
編集済み: KSSV 2020 年 8 月 10 日
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 件のコメント
KSSV
KSSV 2020 年 8 月 10 日
What have you tried? That code will not show any error....it will run.
VBBV
VBBV 2020 年 8 月 10 日
編集済み: VBBV 2020 年 8 月 10 日
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