Title

_rm_matrix_index --
Select rows or columns from a matrix using index numbers for the rows/columns
wanted in the order that they are to appear in the revised matrix.

Syntax

_rm_matrix_index
input-matrix
index-vector
(row | col)
[ name-string ]

inpuat-matrix Name of matrix that is to be revised.

index-vector Name of row vector where each element is
the column or row number to be select. The new matrix contains these rows
or columns in the order they appear in this vector.

row | col Select based on row indices or column
indices.

name-string Names for each row/column of the input
matrix that will be assigned to the revised matrix. This allows you to
change row/column names.

Description

_rm_matrix_index is a programmer's tool that
makes selections using the index numbers of the
rows or columns to be kept in the revised matrix. The revised matrix places
the rows or columns in the order the indices are entered in the index vector.
This command differs from _rm_matrix_select which use a selection
vector of 0 and 1 indicating which rows or columns to select. If you want to
select both rows and columns, run the command twice, once with the row option,
then with the col option.

Saved results

The changed matrix is returned to with the same name. If you want the
to preserve the matrix before the selection, you must save another copy
of the matrix before running this command.

Also see

_rm for other _rm programming commands.