Language Reference
I Function
I (dim) ;
This function is supported by the IML procedure and the iml action.
The I function creates an identity matrix with dim rows and columns. The diagonal elements of an identity matrix are ones; all other elements are zeros. The value of dim must be an integer greater than or equal to 1. Noninteger operands are truncated to their integer part.
For example, the following statements compute a identity matrix:
a = I(3);
print a;
Figure 187: An Identity Matrix
| a | ||
|---|---|---|
| 1 | 0 | 0 |
| 0 | 1 | 0 |
| 0 | 0 | 1 |
Last updated: April 16, 2021