SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 2 Vol 1

MATRIX ADD ROW

Name:
    MATRIX ADD ROW (LET)
Type:
    Let Subcommand
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:
    None
Synonyms:
    None
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:
    Multivariate Analysis
Implementation Date:
    1998/8
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.