| Product | Release |
|---|---|
| SAS/IML | 9.2 |
| Previous | | | Next |
| Working with Matrices |
With SAS/IML software, you can write compound expressions involving several matrix operators and operands. For example, the following statements are valid matrix assignment statements:
a=x+y+z;
a=x+y*z\prime ;
a=(-x)#(y-z);
The rules for evaluating compound expressions are as follows:
a=x+y*z;
This statement first multiplies matrices
a=x/y/z;
This statement first divides each element of matrix
-x**2
When multiple prefix or postfix operators are juxtaposed, precedence is determined by their order from inside to outside.
For example, the following expression is evaluated as
:
a`[i,j]
a=x/(y/z);
This statement is evaluated by first dividing elements of | Previous | | | Next | | | Top of Page |
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.
