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

COMBINE

Name:
    COMBINE
Type:
    LET Subcommand
Purpose:
    Combine the contents of one or more variables, parameters, or constants into a single variable.
Description:
    This command is similar to the APPEND or EXTEND commands. However it provides the additional flexibility:

    1. APPEND and EXTEND only work with variables. The COMBINE command also allows parameters and constants.

      The output for the COMBINE command is always a single variable.

    2. APPEND and EXTEND will only combine the contents of two variables. The COMBINE command will accept up to 30 variables, parameters, or constants.

    Matrices and strings are not supported by the COMBINE command.

Syntax:
    LET <y> = COMBINE <x1> ... <xk>
                      <SUBSET/EXPCEPT/FOR qualification>
    where <x1> ... <xk> is a set of one or more response variables, parameters, or constants;
                <y> is a variable that will contain the contents of <x1> ... <xk> in a single response variable;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
    LET Y = COMBINE Z1 Z2 Z3 Z4 Z5
Note:
    The following syntax is allowed:

      LET Y = COMBINE Y Y Y

    For example,

      LET Y = DATA 1 2 3
      LET Y = COMBINE Y Y Y

    will contain the values 1, 2, 3, 1, 2, 3, 1, 2, 3.

Note:
    The <SUBSET/EXCEPT/FOR qualification> is typically not used with this command. However, if one is given, it will be applied individually to all the variables on the right hand side of the equal sign. It will be ignored for all parameters and constants.
Default:
    None
Synonyms:
    None
Related Commands:
    DATA = Save a list of constants into a variable.
    APPEND = Append one variable to another variable.
    EXTEND = Extends a variable by another variable.
    STACK = Convert a set of response variables to a single response variable and a group-id variable.
Applications:
    Data Management
Implementation Date:
    2010/9
Program:
     
    LET A1 = 1
    LET Y1 = DATA 1 2 3 4 5
    LET A2 = 2
    LET Y2 = DATA 1 2 3 4 5
    LET Y = COMBINE A1 Y1 A2 Y2 -99
    SET WRITE DECIMALS 0
    PRINT Y
        
    The output vector Y wiill contain the values 1, 1, 2, 3, 4, 5, 2, 1, 2, 3, 4, 5, and -99.

Date created: 9/8/2010
Last updated: 9/8/2010
Please email comments on this WWW page to alan.heckert@nist.gov.