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
Best Answer