I want to plot the partial sums of the reciprocals of the squares between 1 and 10.
So far, I've got the following code. It's something along these lines, but I can't quite manage it. I need to sum the terms so far for each point between 1 and 10, but all I know how to do is sum all the terms.
for k = 1:10
S(k) = 1/k^2;
end
plot(1:10, sum(S(1:10))
Add the following loop:
for k=1:10 SUM (k) = sum ( S (1:k) ); end
And then
plot (1:10,SUM)