MATRIX ADD ROW
Name:
Type:
Purpose:
Add a row to an existing matrix.
Description:
It is sometimes convenient to add an observaton (i.e., a
row) to an already existing data matrix. This command
allows you to do that in a simple way.
Syntax:
LET <mat2> = MATRIX ADD ROW <mat1> <x>
where <mat1> is the original data matrix;
<x> is a vector containing the data values for
the new row of data;
and where <mat2> is the resulting matrix.
Note that <mat2> is typically the same as <mat1>.
Also, the number of rows in <x> should be equal to the
number of columns in <mat1>.
Examples:
LET M = MATRIX ADD ROW M X
Note:
Matrices are created with either the READ MATRIX command or the
MATRIX DEFINITION command. Enter HELP MATRIX DEFINITION and HELP
READ MATRIX for details.
Default:
Synonyms:
Related Commands:
READ MATRIX
|
= Read a matrix.
|
MATRIX COLUMN DIMENSION
|
= Dimension maximum number of columns
for Dataplot matrices.
|
MATRIX DELETE ROW
|
= Delete a row from a matrix.
|
MATRIX ROW
|
= Copy a row of a matrix to a column.
|
Applications:
Implementation Date:
Program:
READ MATRIX M
1 2 3
4 5 6
7 8 9
END OF DATA
LET X = DATA 10 11 12
LET M = MATRIX ADD ROW M X
PRINT M
Date created: 6/5/2001
Last updated: 4/4/2003
Please email comments on this WWW page to
alan.heckert@nist.gov.