Order of logical operators
Show older comments
1 < 5 > 2 gives false
1 Comment
John D'Errico
on 13 Oct 2018
There is no need to close a question that has had answers provided. In fact, doing so removes the value of the answer provided for others to read.
Accepted Answer
More Answers (1)
KALYAN ACHARJYA
on 13 Oct 2018
Edited: KALYAN ACHARJYA
on 13 Oct 2018
Here Logic is false
1 < 5 > 2
1<5 gives 0
and 0>2 false
so Ans 0
If you do others
3>2>0 gives you 1
as 3>2 true gives 1, which is > 0
Ans 1
Hope it clears your doubt
2 Comments
Akash Sinhal
on 13 Oct 2018
KALYAN ACHARJYA
on 13 Oct 2018
Edited: KALYAN ACHARJYA
on 13 Oct 2018
Because 1<5 True its gives you 1, next 1>2 False, so result false
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!