why my matlab code calculates the inequality wrongly?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Pooneh Shah Malekpoor
il 23 Ott 2022
Commentato: Pooneh Shah Malekpoor
il 23 Ott 2022
Hello
I am defining inequility for a condition; however, Matlab cannot compare two sides correctly as is attached here. How should I solve this issue?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1165998/image.jpeg)
even matlab says:
-5.4485 >= 1e-6
ans =
logical
0
It is strange!!!!
0 Commenti
Risposta accettata
James Tursa
il 23 Ott 2022
Modificato: James Tursa
il 23 Ott 2022
Negative numbers are not greater than positive numbers. This is the correct result. What is strange to you about this?
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!