Language Reference

Element Maximum Operator:   <>

selects the larger of two elements

matrix1<>matrix2
matrix<>scalar
matrix<>vector

The element maximum operator (<>) compares each element of matrix1 to the corresponding element of matrix2. The larger of the two values becomes the corresponding element of the new matrix that is produced.

When either argument is a scalar, the comparison is between each matrix element and the scalar. If either operand is a row or column vector, then the operation is performed using that vector on each of the rows or columns of the matrix.

The element maximum operator can take as operands two character matrices or a character matrix and a character string. If the element lengths of the operands are different, the shorter elements are padded on the right with blanks. The element length of the result is the longer of the two operand element lengths.

When a missing value occurs in an operand, IML treats it as smaller than any valid number.

For example, the following statements produce the matrix c, as shown:

  
    a={2 4 6, 10 11 12}; 
    b={1 9 2, 20 10 40}; 
    c=a<>b;
 

  
                C             2 rows      3 cols    (numeric) 
  
                                2         9         6 
                               20        11        40
 

Previous Page | Next Page | Top of Page