iteration only runs once.
Show older comments
i have a part of the code that calls other functions until a parameter is true. To have a safety i put in a counter that can break out of the iteration if too many iterations don't give a result. I must do something wrong, because after one iteration the process stops, even wile in the workspace the papameter is still 0. Here is the part of my code
counter = 0;
for realpositiondetected = true
(call other functions)
counter = counter+1;
if counter >= 25
disp 'real position was not found in 25 iterations'
return
end
end
I don't have much programming experience, so i might be an easy fix i'm overlooking
Thanks Bert
Accepted Answer
More Answers (0)
Categories
Find more on Environment and Settings in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!