Previous Page | Next Page

Working with Matrices

The AUTONAME Option in the RESET Statement

You can use the RESET statement with the AUTONAME option to automatically display row and column headings. If your matrix has rows and columns, the row headings are ROW1 to ROW and the column headings are COL1 to COL. For example, the following statements produce the subsequent matrix:

coffee={4 2 2 3 2, 3 3 1 2 1, 2 1 0 2 1, 5 4 4 3 4};
reset autoname;
print coffee;

Figure 5.31 Result of the AUTONAME Option
coffee
  COL1 COL2 COL3 COL4 COL5
ROW1 4 2 2 3 2
ROW2 3 3 1 2 1
ROW3 2 1 0 2 1
ROW4 5 4 4 3 4

Previous Page | Next Page | Top of Page