The Function penter

Entering matrices of polynomials in long format is a bit cumbersome. The function `penter' provides a little help. Its format is A = penter(m,k,C) where m is the number of rows in the matrix of polynomials, where k is the least common denominator of its coefficents, and where C is the (mn)x(d + 1) matrix whose entries give, for each of the mn entries, going column by column, the d + 1 numerators of the coefficients when they are written with denominator k.

For example, the matrix in the first example in long format is entered in two steps C = [0 1 2 1; 1 1 1 1] and A = penter(1,1,C). The matrix in the second example is entered in two steps C = [0 0 0 2; 0 0 0 0; 0 0 0 0; 0 0 0 0; 0 0 0 -4; 1 -9 22 -16; 0 0 0 0; 0 0 0 -4; 0 2 -14 20] and A = penter(3,2,C).

Admittedly, penter is not a big help. Fortunately, it is not necessary to enter matrices in long format very often, and there is a special function to enter the type of matrices of polynomials that will be encountered most often, namely, those of the form xI - A, where A is a square matrix of rational numbers and I is the identity matrix of the same size as A.

Return to Chapter 8.