The Function `rcop.'

The function `rcop' is used in a command of the form A = rcop(A,a,b,c,d), where A is the name of the matrix on which the operation is to be performed and where the numbers a, b, c, d describe the operation to be performed in the following way.

For example, the sequence of steps shown at the top of page 18 that transform the 2x3 matrix whose first row is 2, 4, 6 and whose second row is 1, 3, 5 into an equivalent diagonal matrix can be carried out by entering the matrix, giving it the name A, and successively entering the following commands at the Matlab prompt:

The first of these commands subtracts column 2 from column 3, the second subtracts column 3 from column 2, and so forth. In entering these instructions, you needn't tediously type the entire command each time. Hitting the `up arrow' key will recall the previous command. All that changes is the values of a, b, c, d, so you can just modify this part of the command and hit `enter' to enter the next command. Thus, for the second step, you only need to use the up arrow key and then change 2, 3 to 3, 2 at the end of the command. At the third step it is even easier: hit the `up arrow' key twice!

For more on `rcop', continue. Otherwise, return to Chapter 2.