SAC Command Reference Manual

SUB

SUMMARY

Subtracts a constant from each data point.

SYNTAX

SUB {v1 {v2 ... vn} }

INPUT

v1:Constant to subtract from first file.
v2:Constant to subtract from second file.
nv:Constant to subtract from nth file.

DEFAULT VALUES

SUB 0

DESCRIPTION

This command will subtract a constant from each element of each data file currently in memory. The constant may be the same or different for each data file. If there are more data files in memory than constants, then the last constant entered is used for the remainder of the data files in memory.

EXAMPLES

To subtract 5.1 from each element of F1 and 6.2 from each element of F2 and F3:

SAC> READ F1 F2 F3
SAC> SUB 5.1 6.2

Note: SUBTRACT is also an INLINE function.

HEADER CHANGES

DEPMIN, DEPMAX, DEPMEN

ERROR MESSAGES

  • 1301: No data files read in.
  • 1307: Illegal operation on spectral file

LATEST REVISION

January 8, 1983 (Version 8.0)