If x and y are two real scalars, then
- the value of x == y is 1 if x is equal to y, and 0 otherwise.
- the value of x < y is 1 if x is less than y, and 0 otherwise.
- the value of x > y is 1 if x is greater than y, and 0 otherwise.
- the value of x <= y is 1 if x is less than or equal to
y, and 0 otherwise.
- the value of x >= y is 1 if x is greater than or equal to
y, and 0 otherwise.
- the value of x != y is 1 if x is not equal to
y, and 0 otherwise.
These operations are also defined if either one of x and y is a scalar and
the other is a matrix, or both are matrices of the same size. In that case, when
the relation of interest is true for any two corresponding elements, the value of the operation is 1.
For example
>> 3 > -5
1
>> -2 >= 0
0
>> x = [1, 2, 3, 5]
>> x >= 1
1
>> y = [2, 2, 3, 7]
>> x < y
0
>> x <= y
1
oz
2009-12-22