MATLAB: For loope small increments

for loopsmall increments

I cannot seem to find the solution to this problem. I write a for loop and i tell it to increment by a small value, but instead of starting at 1, it starts at 2.9110 here is the loop
for m=1:.001:4
m
end
does anyone know what its going on? i expect it to start at 1 and increment by .001 every time so that it goes 1.001, 1.002, 1.003 and so on thank you

Best Answer

I don't know why you think this starts at 2.910. Perhaps you are running into the limit of your command window when trying to scroll back up after running the loop. Do this:
for m=1:.001:4
m
pause(.5)
end
Now you should see m incrementing like you expect as it prints slowly out.