octave: Comparison Ops

 
 8.4 Comparison Operators
 ========================
 
 “Comparison operators” compare numeric values for relationships such as
 equality.  They are written using _relational operators_.
 
    All of Octave’s comparison operators return a value of 1 if the
 comparison is true, or 0 if it is false.  For matrix values, they all
 work on an element-by-element basis.  Broadcasting rules apply.  See
 Broadcasting.  For example:
 
      [1, 2; 3, 4] == [1, 3; 2, 4]
           ⇒  1  0
               0  1
 
    According to broadcasting rules, if one operand is a scalar and the
 other is a matrix, the scalar is compared to each element of the matrix
 in turn, and the result is the same size as the matrix.
 
 ‘X < Y’
      True if X is less than Y.
 
 ‘X <= Y’
      True if X is less than or equal to Y.
 
 ‘X == Y’
      True if X is equal to Y.
 
 ‘X >= Y’
      True if X is greater than or equal to Y.
 
 ‘X > Y’
      True if X is greater than Y.
 
 ‘X != Y’
 ‘X ~= Y’
      True if X is not equal to Y.
 
    For complex numbers, the following ordering is defined: Z1 < Z2 if
 and only if
 
        abs (Z1) < abs (Z2)
        || (abs (Z1) == abs (Z2) && arg (Z1) < arg (Z2))
 
    This is consistent with the ordering used by “max”, “min” and “sort”,
 but is not consistent with MATLAB, which only compares the real parts.
 
    String comparisons may also be performed with the ‘strcmp’ function,
 not with the comparison operators listed above.  SeeStrings.
 
  -- : eq (X, Y)
      Return true if the two inputs are equal.
 
      This function is equivalent to ‘X == Y’.
 
DONTPRINTYET       See also: Seene XREFne, Seeisequal XREFisequal, *notele:
DONTPRINTYET DONTPRINTYET       See also: Seene XREFne, Seeisequal XREFisequal, Seele

      XREFle, Seege XREFge, Seegt XREFgt, Seene XREFne, *noteDONTPRINTYET DONTPRINTYET       See also: Seene XREFne, Seeisequal XREFisequal, Seele

      XREFle, Seege XREFge, Seegt XREFgt, Seene XREFne, See
      lt XREFlt.
 
  -- : ge (X, Y)
      This function is equivalent to ‘X >= Y’.
 
      See also: Seele XREFle, Seeeq XREFeq, Seegt XREFgt,
      Seene XREFne, Seelt XREFlt.
 
  -- : gt (X, Y)
      This function is equivalent to ‘X > Y’.
 
      See also: Seele XREFle, Seeeq XREFeq, Seege XREFge,
      Seene XREFne, Seelt XREFlt.
 
  -- : isequal (X1, X2, ...)
      Return true if all of X1, X2, ... are equal.
 
      See also: Seeisequaln XREFisequaln.
 
  -- : isequaln (X1, X2, ...)
      Return true if all of X1, X2, ... are equal under the additional
      assumption that NaN == NaN (no comparison of NaN placeholders in
      dataset).
 
      See also: Seeisequal XREFisequal.
 
  -- : le (X, Y)
      This function is equivalent to ‘X <= Y’.
 
      See also: Seeeq XREFeq, Seege XREFge, Seegt XREFgt,
      Seene XREFne, Seelt XREFlt.
 
  -- : lt (X, Y)
      This function is equivalent to ‘X < Y’.
 
      See also: Seele XREFle, Seeeq XREFeq, Seege XREFge,
      Seegt XREFgt, Seene XREFne.
 
  -- : ne (X, Y)
      Return true if the two inputs are not equal.
 
      This function is equivalent to ‘X != Y’.
 
DONTPRINTYET       See also: Seeeq XREFeq, Seeisequal XREFisequal, *notele:
DONTPRINTYET       See also: Seeeq XREFeq, Seeisequal XREFisequal, Seele

      XREFle, Seege XREFge, Seelt XREFlt.