COMPUTE

##
COMPUTE

            [SIC\]COMPUTE OutVar OPERATION InVar  [Parameters]  [/BLANKING  Bval
        [Eval]]

        Perform operations or transformations on variables that are not directly
        supported by the array capabilities of the SIC command interpretor. Out-
        Var is the output variable, InVar the input variable. Outvar must be de-
        fined beforehand.

        The following operations are available on INTEGER, REAL and DOUBLE  PRE-
        CISION arrays, regardless of their nature:
          - MAX
            MIN
            MEAN
            RMS (standard deviation)
            SUM
            PRODUCT
            MEDIAN
            for which InVar is an array of rank 1 to 7 (a 1-D to 7-D array), and
            OutVar must be an array of lesser rank (i.e., one or more  dimension
            less  than InVar, down to a number), AND of identical shape as InVar
            for the dimensions in common.
            Example (if A[4,12,2,8] and B[4,12]):
                    COMPUTE B MAX A
            Sections, implicit transpositions, etc... permitted by SIC are  sup-
            ported.
          - HISTOGRAM: see subtopic HISTOGRAM for details.
        Blanking  values Bval and Eval allow to ignore values of the Invar array
        if at Eval from Bval, for these operations only. At least Bval  must  be
        passed  to  option /BLANKING, and default is 0.0 for Eval.  SET BLANKING
        has no effect here since it is a command of the GREG1\ language.
        In case of no valid result, NaN is returned, or Bval if blanking is  en-
        abled. This may occur in particular when all InVar values are blanked.

        The following transformations are available:
          - GATHER
            Return the list of different input values (see subtopic for details)
          - RANKORDER
            Return the ordering of the input values.
          - INTEGRAL or DERIVATIVE
            Integral or derivative of the input variable
          - FFT+ or FFT-
            Direct  or  Inverse Fast Fourier Transform: see subtopic FFT for de-
            tails.
          - FOURT+ or FOURT-
            Direct or Inverse Fast Fourier Transform: see subtopic FOURT for de-
            tails.
          - COMPLEX
            Populates  the  Real and (optionally) Imaginary part of OutVar (com-
            plex variable) with InVar (real) and (optionally) the Imaginary part
            by the following (real) variable name.
          - REAL
            OutVar = REAL part of InVar. OutVar is Real, InVar is Complex .
          - IMAG
            OutVar = IMAGE part of InVar. OutVar is Real, InVar is Complex.
          - ABS
            OutVar = AMPLITUDE (InVar). OutVar is Real, InVar is Complex.
          - PHASE
            OutVar = PHASE (InVar). OutVar is Real, InVar is Complex.
          - CMP*  operations  as  in  "COMPUTE OutVar CMPMUL InVar1 InVar2". All
            variables must be complex arrays of identical size.
              CMPADD: OutVar = InVar1 + InVar2.
              CMPSUB: OutVar = InVar1 - InVar2.
              CMPMUL: OutVar = InVar1 * InVar2.
              CMPDIV: OutVar = InVar1 / InVar2.

        Operations on files:
          - DATE: File last modification time
          - FILESIZE: File size in bytes
          - LINES: Number of lines in a formatted file

        Miscellaneous operations (see subtopics for details):
          - DIMOF
          - GAG_DATE
          - LOCATION
          - BTEST Test bit values
          - IS_A_SIC_VAR

Subsections

- COMPUTE DATE
- COMPUTE FILESIZE
- COMPUTE DIMOF
- COMPUTE FFT
- COMPUTE FOURT
- COMPUTE GATHER
- COMPUTE GAG_DATE
- COMPUTE HISTOGRAM
- COMPUTE IS_A_SIC_VAR
- COMPUTE LINES
- COMPUTE LOCATION
- COMPUTE RANKORDER
- COMPUTE INTEGRAL
- COMPUTE DERIVATIVE
- COMPUTE BTEST