*MERGE
*MERGE, Name1, Name2, Val1, Val2
Merges two dense matrices or vectors into one.
Argument Descriptions
Name1Name of the matrix or vector to extend.
Name2Name of the matrix or vector to be merged into
Name1.Val1,Val2Additional input. The meaning of
Val1andVal2varies depending on the entity type (matrix or vector). See details below.
The following Val1 and Val2 fields are used if Name1 refers to a dense matrix created by the *DMAT command:
Val1Column or row number indicating where the new values are to be inserted into the
Name1matrix.Val2Specifies how the
Name2matrix or vector is copied into theName1matrix.- COL
Insert the new values at the column location specified by
Val1(default).- ROW
Insert the new values at the row location specified by
Val1.
The following Val1 field is used if Name1 refers to a vector
created by the *VEC command:
Val1Row number indicating where the new values are to be inserted into the
Name1vector.
Notes
*MERGE can be used to add new columns or
rows to a dense matrix that was created by the *DMAT command. In this case, Name1 must be
the name of the dense matrix and Name2 must
refer to a vector or another dense matrix.
The following two examples demonstrate merging columns into a dense matrix.

The following example demonstrates merging rows into a dense matrix.

*MERGE can also be used to add new rows to
a vector that was created by the *VEC command.
In this case, Name1 and Name2 must both refer to vectors, as demonstrated in the example below.

In all cases, the values of the original matrix or vector are retained, and the matrix or vector is resized to accommodate the additional rows or columns.