MATLAB Answers

Varg E
0

how to solve this in matlab

Asked by Varg E
on 13 Feb 2019
Latest activity Edited by Adam Danz
on 13 Feb 2019
hi guys how can I solve this in matlab?? 1.jpg

  0 Comments

Sign in to comment.

1 Answer

Answer by Adam Danz
on 13 Feb 2019
Edited by Adam Danz
on 13 Feb 2019
 Accepted Answer

This solution relies on only one for-loop (although technically you could replace this for-loop, too). 'sumOut' is the solution to the equation.
kMax = 10;
out = zeros(1,kMax);
for k = 1:kMax
out(k) = sum(sin((pi + 0.1)./(1:k)) .* exp(-k/2));
end
sumOut = sum(out);

  0 Comments

Sign in to comment.