MATLAB: Summation with FOR Loop

for loopsummation

Hello, Super noob question, but how do I do the attached picture in MatLab using a FOR loop. I just need to know how to set up the loop, not the actual values. Thanks for any help!

Best Answer

omega=...;
t=...;
N=...;
summe = 0.0;
for k=1:N
summe = summe + sin(omega*t*(2*k-1))/(2*k-1);
end
Best wishes
Torsten.