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 1 Vol 2

LET

Name:
    LET
Type:
    Analysis Command
Purpose:
    The LET command is DATAPLOT's most versatile command; it has a variety of uses:

    1. evaluating functions;
    2. transforming variables;
    3. specifying elements of variables;
    4. calculating statistics;
    5. creating a sequence;
    6. creating a pattern;
    7. generating random numbers;
    8. manipulating/sorting data;
    9. defining functions;
    10. carrying out math operations.
Syntax:
    The syntax varies depending on the type of operation performed.
Examples:
    LET A = SIN(2*PI*0.025)
    LET Y = (X**LAMBDA-1)/LAMBDA
    LET Y(3) = LOG(4.5)-2**3.8
    LET M = MEAN Y
    LET X = SEQUENCE 1 .1 10
    LET X = PATTERN 1 1 2 2 3 3 FOR I = 1 1 30
    LET X = NORMAL RANDOM NUMBERS FOR I=1 1 80
    LET Y2 = SORT Y
    LET FUNCTION F = C*EXP(-X*X/2)
    LET A = INTEGRAL F WRT X FOR X 0 TO 1
Default:
    None
Synonyms:
    None
Note: Note:
    If you enter a command like

      Y = NORMAL RANDOM NUMBERS FOR I = 1 1 100

    Dataplot would previously return an error. The 2018/10 version of Dataplot was updated so that if a command is not matched, the command does not start with LET, and the command contains an "=" character, Dataplot will insert a "LET " at the beginning of the command string and try to match the command again.

    Note that using "LET" to start the command is still the preferred syntax since this new syntax is only attempted if the first word of the command line does not match a Dataplot command. For example, "X", "R", "S", and "W" are short-cuts to existing commands, so the following will not work

      X = X + 1
      W = W + 1
      R = R + 1
      S = S + 1

    Note that if the left hand side name matches an existing Dataplot command, this syntax of leaving off the LET will fail.

Related Commands:
    LET FUNCTION = Defines functions.
    LET STRING = Defines a string.
    STATUS = Displays dimension, variables, parameters, and functions.
    WRITE = Writes variables, parameters, and functions to the screen or to a file.
Applications:
    Data Management
Implementation Date:
    Pre-1987
    2018/10: Syntax with "LET" omitted
Program 1:
    LET A = 2
Program 2:
    LET X = SEQUENCE -3.1 0.1 3.1
    LET FUNCTION F = SIN(X)
    LET Y = F
Program 3:
    LET Y = NORMAL RANDOM NUMBERS FOR I = 1 1 100
    LET YMEAN = MEAN Y
    LET YSD = SD Y
Date created: 11/06/2018
Last updated: 12/04/2023

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