Language Reference |
subtracts corresponding matrix elements
The subtraction infix operator (-) produces a new matrix containing elements that are formed by subtracting the corresponding elements of matrix2 from those of matrix1.
In addition to subtracting conformable matrices, you can also use the subtraction operator to subtract a matrix and a scalar or a matrix and a row or column vector. When either argument is a scalar, the operation is performed by using the scalar against each element of the matrix argument. 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.
When a missing value occurs in an operand, IML assigns a missing value for the corresponding element in the result.
An example of a valid statement follows:
c=a-b;
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.