You can use the RESET statement with the AUTONAME option to automatically display row and column headings. If your matrix has n rows and p columns, the row headings are ROW1 to ROWn and the column headings are COL1 to COLp. 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;