MATLAB: Help with For End loop

desperatefor end loophomeworkloopnew to matlab

Use a For-end loop in a script file to calculate the sum of the first n terms of the series:
Summation sign on the top n bottom k=1 : ((-1)^k * k^2 +5k)/3^k Show the script file and the two results of n = 10 and n = 20.
WHAT IS THIS I DONT UNDERSTAND LOOPS HELP PLEASE IM BEGGING!!!. x.x

Best Answer

n=10;
theSum = 0;
for k = 1 : n
theSum =
OK, that should be enough hint for you to finish your homework.