identityThis function creates an identity matrix with 1's diagonally from to left to bottom right, with other fields at zero
Indirect parameter passing is disabled
1
| No. | Type | Description |
|---|---|---|
| 1 input |
numeral | size Defines the nxn size of the identity matrix to be created |
| Type | Description |
|---|---|
| matrix | Identity matrix Contains 1's across the diagonal |
print matrix( "0", 2, " |", "Identity Matrix = ", identity(5) ); | 1 0 0 0 0 |
| 0 1 0 0 0 |
Identity Matrix = | 0 0 1 0 0 |
| 0 0 0 1 0 |
| 0 0 0 0 1 |