MATLAB: Having trouble with for loops

for loop

Having Trouble…
'Sum of N^2 with N = 1 to 1,000 using a for loop'

Best Answer

out = 1;
for ii = 2:1000
out = out + ii^2;
end
Related Question