/* First load the necessary file: */ LOAD('NCHRPL); /* Now generate a 6 x 6 matrix to work with: */ H[I,J]:=(I+J)/(I*J); TEST_MATRIX:60*GENMATRIX(H,6,6,1,1); /* We wish to compare the performance of NCHARPOLY and CHARPOLY. */ SHOWTIME:ALL$ NCHARPOLY(TEST_MATRIX,X); RATSIMP(CHARPOLY(TEST_MATRIX,X)); /* The RATSIMP was necessary to obtain a form as neat as the one returned by NCHARPOLY. Another function in this package is MATTRACE, which takes the trace of a matrix: */ MATTRACE(TEST_MATRIX);