Why does the following code
for a=1:5:100
a = a+ 1;
end
iterate 20 times?
a
goes up by 5 every iteration, but also goes up by 1 in the actual loop. 99/6 = 16.5 or 17 iterations, so why does it do 20?
Thanks for any help understanding how the for loop function works.