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 COMBINE COLUMNS

Name:
    MATRIX COMBINE COLUMNS (LET)
Type:
    Let Subcommand
Purpose:
    Combine two matrices by columns.
Description:
    It is sometimes convenient to extend the columns of one matrix with the columns 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  5  6 |
                 | 3   4  7  8 |
        
    This command requires that the two input matrices have the same number of rows.
Syntax:
    LET <m3> = MATRIX COMBINE COLUMNS <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 COLUMNS M1 M2
    LET MOUT = MATRIX COMBINE COLUMNS M1 M2
Note:
    Matrices can be created with the READ MATRIX, CREATE MATRIX or MATRIX DEFINITION commands.
Default:
    None
Synonyms:
    MATRIX AUGMENT
Related Commands: Applications:
    Multivariate Analysis
Implementation Date:
    2011/1
Program:
     
    dimension 100 columns
    .
    read matrix m1
    1 2
    3 4
    end of data
    .
    read matrix m2
    5 6
    7 8
    end of data
    .
    let m3 = matrix combine columns m1 m2
    .
    set write decimals 0
    print m3
        
    The following output is generated.
     
            MATRIX M3      --            2 ROWS
                           --            4 COLUMNS
    
     VARIABLES--M31            M32            M33            M34     
    
              1              2              5              6
              3              4              7              8
        

Date created: 01/26/2011
Last updated: 01/26/2011
Please email comments on this WWW page to alan.heckert@nist.gov.