Dataplot Vol 2 Vol 1

# MATRIX COMBINE ROWS

Name:
MATRIX COMBINE ROWS (LET)
Type:
Let Subcommand
Purpose:
Combine two matrices by rows.
Description:
It is sometimes convenient to extend the rows of one matrix with the rows of another matrix. For example, given the matrices

```
M1 = | 1   2 |
| 3   4 |
```
and
```
M2 = | 5   6 |
| 7   8 |
```

this command will generate the matrix

```
M3 = | 1   2 |
| 3   4 |
| 5   6 |
| 7   8 |
```

This command requires that the two input matrices have the same number of columns.

Syntax:
LET <m3> = MATRIX COMBINE ROWS <m1> <m2>
where <m1> is the first input matrix;
<m2> is the second input matrix;
and      <m3> is the resulting matrix.

Note that <m3> can be the same name as either <m1> or <m2>.

Examples:
LET M3 = MATRIX COMBINE ROWS M1 M2
LET MOUT = MATRIX COMBINE ROWS M1 M2
Note:
Matrices can be created with the READ MATRIX, CREATE MATRIX or MATRIX DEFINITION commands.
Default:
None
Synonyms:
MATRIX COMBINE ROW
Related Commands:
 MATRIX COMBINE COLUMNS = Combine the columns of two matrices. READ MATRIX = Read a matrix. CREATE MATRIX = Create a matrix from existing columns. MATRIX DIMENSION = Dimension maximum number of columns or rows for Dataplot matrices. MATRIX ADD ROW = Add a single row to a matrix.
Applications:
Multivariate Analysis
Implementation Date:
2011/1
Program:
```
dimension 100 columns
.
1 2
3 4
end of data
.
5 6
7 8
end of data
.
let m3 = matrix combine row m1 m2
.
set write decimals 0
print m3
```
The following output is generated.
```        MATRIX M3      --            4 ROWS
--            2 COLUMNS

VARIABLES--M31            M32

1              2
3              4
5              6
7              8
```

Date created: 01/26/2011
Last updated: 01/26/2011