I have noticed this strange behavior and I just can't figure why this is happening.
I have a script looping through a certain parameter and then saving some output results for certain values of that parameter. The relevant part of the script is:
for Thr=0.4:0.1:0.7disp(Thr);if Thr==0.5disp('but I am here?');endif Thr==0.6disp('am i here?');endend>>0.40000.5000but I am here?0.60000.7000
For some reason, it the if statement doesnt recognize Thr value of 0.6. If I use a step of 0.01, same happens for Thr values of 0.59, 0.58 and 0.57. I didnt test much further than that.
What is happening here?