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

CHEBYSHEV DISTANCE

Name:
    CHEBYSHEV DISTANCE (LET)
Type:
    Let Subcommand
Purpose:
    Compute the Chebyshev distance between two variables.
Description:
    The Chebyshev distance between two variabes X and Y is defined as

      \[ d = \max_{i} {|X_{i} - Y_{i}|} \]
Syntax:
    LET <par> = CHEBYSHEV DISTANCE <y1> <y2>       <SUBSET/EXCEPT/FOR qualification>
    where <y1> is the first response variable;
                <y2> is the second response variable;
                <par> is a parameter where the computed Chebyshev distance is stored;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
    LET A = CHEBYSHEV DISTANCE Y1 Y2
    LET A = CHEBYSHEV DISTANCE Y1 Y2 SUBSET Y1 > 0 SUBSET Y2 > 0
Note:
    Dataplot statistics can be used in a number of commands. For details, enter

Default:
    None
Synonyms:
    None
Related Commands: Applications:
    Mathematics
Implementation Date:
    2017/08
Program 1:
     
    SKIP 25
    READ IRIS.DAT Y1 TO Y4 X
    .
    LET DIST  = CHEBYSHEV DISTANCE Y1 Y2
    SET WRITE DECIMALS 4
    TABULATE CHEBYSHEV DISTANCE Y1 Y2 X
        
                Cross Tabulate CHEBYSHEV DISTANCE
     
    (Response Variables: Y1       Y2      )
    ---------------------------------------------
           X          |   CHEBYSHEV DISTA
    ---------------------------------------------
             1.0000   |            2.2000
             2.0000   |            4.0000
             3.0000   |            5.1000
        
    .
    XTIC OFFSET 0.2 0.2
    X1LABEL GROUP ID
    LET NDIST = UNIQUE X
    XLIMITS 1 NDIST
    MAJOR X1TIC MARK NUMBER NDIST
    MINOR X1TIC MARK NUMBER 0
    CHAR X
    LINE BLANK
    LABEL CASE ASIS
    CASE ASIS
    TITLE CASE ASIS
    TITLE OFFSET 2
    .
    TITLE Chebyshev Distance (IRIS.DAT)
    Y1LABEL Chebyshev Distance
    CHEBYSHEV DISTANCE PLOT Y1 Y2 X
        

    plot generated by sample program

Program 2:
     
    set write decimals 3
    dimension 100 columns
    .
    skip 25
    read iris.dat y1 y2 y3 y4
    skip 0
    .
    let z = generate matrix chebyshev distance y1 y2 y3 y4
    print z
        
    The following output is generated
            MATRIX Z       --            4 ROWS
                           --            4 COLUMNS
    
     VARIABLES--Z1             Z2             Z3             Z4      
    
              0.000          5.100          5.600          6.600
              5.100          0.000          4.300          4.000
              5.600          4.300          0.000          4.700
              6.600          4.000          4.700          0.000
        

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 08/31/2017
Last updated: 08/31/2017

Please email comments on this WWW page to alan.heckert@nist.gov.