The First Example

To work through the first example on page 86, first give the command A = penter(1,1,[0 1 2 1; 1 1 1 1]); ldisp(A) on one line, which will result in the display of the matrix in that example.

Then the rcops of that example are:

If you enter the steps in just this way, after each step the result will be displayed in long format, which is not very easy to read. A method that shows the steps more clearly is to follow each command with a semicolon to suppress the display of the result in long format and then, on the same line, to enter the command ldisp(A). (Of course, with the up arrow key, it is only necessary to enter the first operation in full. For the others, only the changes in the specification of the prcop need to be made.) This will show the successive steps in the form they are shown on page 86.

While you have the matrix of this example in long format, you might as well try the function `palgo' to do the reduction to diagonal form automatically. First, as in Chapter 2, the matrix needs to be put in `hat format', so enter G = pnewhat(A);ldisp(G). (Of course `pnewhat' means newhat for a matrix of polynomials in long format.) Then repeated application of G = palgo(G);ldisp(G) will step through the algorithm until the diagonal form has been reached.

This method shows the whole hat format matrix at each stage, and it shows the denominator 2 that becomes needed for the representation of N but not of A. For these reasons, it is better to use a line with two commands G = palgo(G);ldisp(punhat(G)). (Of course `punhat' means `unhat' for a matrix of polynomials in hat format. This function, as you would expect, has three outputs, but if you use only the first one the other two are ignored.) The result of this method is precisely the sequence of matrices shown on page 86.

Return to Chapter 8.