Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

need help in to write a matlab script

Asked by Sg dg on 29 Dec 2012

how do you write a matlab script to calculate the Sum for the expression?

http://s188.beta.photobucket.com/user/raneses88/media/untitled-1_zpscb940cb6.jpg.html?sort=3&o=0

0 Comments

Sg dg

Products

No products are associated with this question.

2 Answers

Answer by Sabarinathan Vadivelu on 29 Dec 2012
Accepted answer
n = 10;    % assuming it to be 10
x = 0;
for i = 1 : n
    x = ((1/i) + (1/(i+2)*(i+3))) + x;
end

0 Comments

Sabarinathan Vadivelu
Answer by Roger Stafford on 29 Dec 2012
 ix = 1:n;
 s = sum(1./ix+1./((ix+2).*(ix+3)));

0 Comments

Roger Stafford

Contact us