need help in to write a matlab script

조회 수: 1 (최근 30일)
Sg dg
Sg dg 2012년 12월 29일
how do you write a matlab script to calculate the Sum for the expression?

채택된 답변

Sabarinathan Vadivelu
Sabarinathan Vadivelu 2012년 12월 29일
n = 10; % assuming it to be 10
x = 0;
for i = 1 : n
x = ((1/i) + (1/(i+2)*(i+3))) + x;
end

추가 답변 (1개)

Roger Stafford
Roger Stafford 2012년 12월 29일
ix = 1:n;
s = sum(1./ix+1./((ix+2).*(ix+3)));

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by