Relational Operators

If x and y are two real scalars, then

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