Language Reference

Sign Reverse Operator:   -

reverses the signs of elements

- matrix

The sign reverse prefix operator (-) produces a new matrix containing elements that are formed by reversing the sign of each element in matrix. A missing value is assigned if the element is missing.

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

  
    a={-1  7  6, 
        2  0 -8}; 
    b=-a;
 

  
                B             2 rows      3 cols    (numeric) 
  
                                1        -7        -6 
                               -2         0         8
 

Previous Page | Next Page | Top of Page