why my matlab code calculates the inequality wrongly?
3 views (last 30 days)
Show older comments
Pooneh Shah Malekpoor
on 23 Oct 2022
Commented: Pooneh Shah Malekpoor
on 23 Oct 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?
even matlab says:
-5.4485 >= 1e-6
ans =
logical
0
It is strange!!!!
0 Comments
Accepted Answer
James Tursa
on 23 Oct 2022
Edited: James Tursa
on 23 Oct 2022
Negative numbers are not greater than positive numbers. This is the correct result. What is strange to you about this?
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!