Hello, there is something strange happening when I run this code (workspace is empty before I run this)
tplot = 0; for t = 1:100 tplot = tplot+0.1; if tplot == 1 tplot tplot = 0; end end
It never jumps inside the if block. When I increase tplot by 0.2 or 0.5 instead of 0.1 it works. I used the debugger to see what's happening when I use 0.1. When tplot reaches 1.0000 it totally ignores the if part.
Do you encounter the same problem? If so, what could be the reasen for this?
Best Answer