why my matlab code calculates the inequality wrongly?

2 Ansichten (letzte 30 Tage)
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?
even matlab says:
-5.4485 >= 1e-6
ans =
logical
0
It is strange!!!!

Akzeptierte Antwort

James Tursa
James Tursa am 23 Okt. 2022
Bearbeitet: James Tursa am 23 Okt. 2022
Negative numbers are not greater than positive numbers. This is the correct result. What is strange to you about this?

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by