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

AGREE

Name:
    AGREE (LET)
Type:
    Library Function
Purpose:
    Return a 1 if the values agree and return a 0 if any of the values disagree.

    The DISAGREE function returns a 1 if any of the values disagree and a 0 if all the values agree.

Syntax 1:
    LET <yout> = AGREE(<y1>,..., <yk>)
                            <SUBSET/EXCEPT/FOR qualification>
    where <y1>, ..., <yk> is a list of one to eight variable or parameters;
                <yout> is a variable or a parameter (depending on what <y1> ... <yk> are) where the computed response values are stored;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Syntax 2:
    LET <yout> = DISAGREE(<y1>,..., <yk>)
                            <SUBSET/EXCEPT/FOR qualification>
    where <y1>, ..., <yk> is a list of one to eight variables or parameters;
                <yout> is a variable or a parameter (depending on what <y1> ... <yk> are) where the computed response values are stored;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
    LET A = AGREE(1,0)
    LET YOUT = AGREE(Y1,Y2)
    LET YOUT = AGREE(Y1,Y2,Y3,Y4)
    LET YOUT = AGREE(Y1,Y2,Y3,Y4) SUBSET TAG = 1
    LET YOUT = DISAGREE(Y1,Y2)
Default:
    None
Synonyms:
    None
Related Commands:
    MAX = Compute the maximum of two numbers.
    MIN = Compute the minimum of two numbers.
Applications:
    Data Management
Implementation Date:
    2011/8
Program:
     
    LET Y1 = DATA 1 1 0 0 0 1
    LET Y2 = DATA 1 0 1 0 1 0
    LET YOUT1 = AGREE(Y1,Y2)
    LET YOUT2 = DISAGREE(Y1,Y2)
    SET WRITE DECIMALS 0
    PRINT Y1 Y2 YOUT1 YOUT2
        
    The following output is generated
    ------------------------------------------------------------
                 Y1             Y2          YOUT1          YOUT2
    ------------------------------------------------------------
                  1              1              1              0
                  1              0              0              1
                  0              1              0              1
                  0              0              1              0
                  0              1              0              1
                  1              0              0              1
        

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