Comparative Operator result is wrong
Afficher commentaires plus anciens

I tried to run the if statement but this happens.
The result must be true(=1) in the last instruction but it returns false(=0)...
Anyone knows what is the problem???
1 commentaire
Stephen23
le 12 Avr 2021
"Anyone knows what is the problem???"
The assumption that binary floating point numbers have infinite precision:
This is worth reading as well:
Réponses (3)
Steven Lord
le 12 Avr 2021
0 votes
Two numbers that are displayed the same may not represent the same stored value. See this Answers post for more information about floating point numbers.
1 commentaire
여춘 박
le 12 Avr 2021
Image Analyst
le 12 Avr 2021
0 votes
Catégories
En savoir plus sur Resizing and Reshaping Matrices dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!