Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
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, the statements

   a={-1  7  6,
       2  0 -8};
   b=-a;
result in the matrix
               B             2 rows      3 cols    (numeric)

                               1        -7        -6
                              -2         0         8

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.