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