Previous Page | Next Page

Language Reference

I Function

I( dim ) ;

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 23.128 An Identity Matrix
a
1 0 0
0 1 0
0 0 1

Previous Page | Next Page | Top of Page