
Page 10-25
Function RSWP
Function RSWP (Row SWaP) takes as arguments two indices, say, i and j,
(representing two distinct rows in a matrix), and a matrix, and produces a
new matrix with rows i and j swapped. The following example, in ALG
mode, shows an application of this function. We use the matrix stored in
variable A for the example. This matrix is listed first.
In RPN mode, function CSWP lets you swap the rows of a matrix listed in
stack level 3, whose indices are listed in stack levels 1 and 2. For example,
the following figure shows the RPN stack before and after applying function
CSWP to matrix A in order to swap rows 2 and 3:
As you can see, the columns that originally occupied positions 2 and 3 have
been swapped.
Function RCI
Function RCI stands for multiplying
R
ow I by a
C
onstant value and replace the
resulting row at the same location. The following example, written in ALG
mode, takes the matrix stored in A, and multiplies the constant value 5 into
row number 3, replacing the row with this product.