If statement not executing
Ältere Kommentare anzeigen
I'm running into a really weird problem . In my Matlab code, the statement if (time == 0.0992) does not execute, but when I write it in the form if (time== 0.0016*62), it does execute.
Now, since 0.0016*62 is equal to 0.0992, I don't see why the first statement is any different from the second.
NOTE : 'time' is a variable who's value is used as a operating condition for the if statement
1 Kommentar
Jan
am 4 Mär. 2012
Welcome to the world of floating point numbers.
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 4 Mär. 2012
1 Stimme
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!