MATLAB: MatLab Logical answer always 1

logical operatorlogical?MATLAB

I have 2017b installed on my mac. Below is the confusing part:…..
>> islogical(5<7)
ans =
logical
1
>> islogical(5>7)
ans =
logical
1

Best Answer

Yes, all these tests (relational operators) return a logical, which is a value that is true (1) or false (0).
But:
>> 5 < 7 % Returns true (symbolized by 1).
ans =
logical
1
>> 5 > 7 % Returns false (symbolized by 0).
ans =
logical
0