For loope small increments
Show older comments
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
Accepted Answer
More Answers (4)
Paulo Silva
on 11 Mar 2011
It works fine here, try this
m=1:.001:4;
What's the first value of the vector m?
marvin corado
on 11 Mar 2011
0 votes
marvin corado
on 11 Mar 2011
1 Comment
Matt Fig
on 11 Mar 2011
Please select a best answer for this question, then start a new one. That way people can search Answers for a specific issue they are having.
marvin corado
on 11 Mar 2011
0 votes
1 Comment
Matt Fig
on 11 Mar 2011
Yes, that way we keep one Question per topic.
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!