Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

Subtraction Operator:   -

subtracts corresponding matrix elements

matrix1 -matrix2
matrix -scalar

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. When either argument is a scalar, the operation is performed by using the scalar against each element of the matrix argument.

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;

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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