1 /* First load the necessary file: */
3 /* Now generate a 6 x 6 matrix to work with: */
5 test_matrix:60*genmatrix(h,6,6,1,1);
6 /* We wish to compare the
7 performance of NCHARPOLY and CHARPOLY. */
9 ncharpoly(test_matrix,x);
10 ratsimp(charpoly(test_matrix,x));
11 /* The RATSIMP was necessary to obtain a form as neat as the
12 one returned by NCHARPOLY.
13 Another function in this package is MATTRACE, which takes
14 the trace of a matrix: */
15 mattrace(test_matrix);