Page 10-12
In RPN mode, assuming that the original 2×3 matrix is already in the stack, use
{1,2} ` {2,3} ` SUB.
Function REPL
Function REPL replaces or inserts a sub-matrix into a larger one. The input for
this function is the matrix where the replacement will take place, the location
where the replacement begins, and the matrix to be inserted. For example,
keeping the matrix that we inherited from the previous example, enter the
matrix: [[1,2,3],[4,5,6],[7,8,9]] . In ALG mode, the following
screen shot to the left shows the new matrix before pressing `. The screen
shot to the right shows the application of function RPL to replace the matrix in
NS(2), the 2×2 matrix, into the 3×3 matrix currently located in NS(1),
starting at position {2,2}:
If working in the RPN mode, assuming that the 2×2 matrix was originally in the
stack, we proceed as follows:
[[1,2,3],[4,5,6],[7,8,9]]`™ (this last key swaps the
contents of stack levels 1 and 2) {1,2} `™(another swapping of levels
1 and 2) REPL.
Function →DIAG
Function →DIAG takes the main diagonal of a square matrix of dimensions n×n,
and creates a vector of dimension n containing the elements of the main
diagonal. For example, for the matrix remaining from the previous exercise, we
can extract its main diagonal by using: