next up previous contents index
Next: COMPUTE EXTRACT Up: SIC Language Internal Help Previous: BREAK   Contents   Index


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     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.

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


Subsections

Gildas manager 2014-07-01