why my matlab code calculates the inequality wrongly?

조회 수: 3 (최근 30일)
Pooneh Shah Malekpoor
Pooneh Shah Malekpoor 2022년 10월 23일
댓글: Pooneh Shah Malekpoor 2022년 10월 23일
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!!!!

채택된 답변

James Tursa
James Tursa 2022년 10월 23일
편집: James Tursa 2022년 10월 23일
Negative numbers are not greater than positive numbers. This is the correct result. What is strange to you about this?

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by