ARITHMETIC OPERATIONS OF DATA-COLUMNS
Arithmetic operations of data columns in a GRAF dataset are supported. Interactive
parameters (see command IPAR) can be used in these
operations.
I: IMPLICIT DEFINITION OF DATA
1. The result of arithmetic operations of some data columns may be plotted
in the following way:
==> H:
X N1 (Y = N1 * SIN(X) * 100)
0.1
-0.5
0.2
-1.5
==> H:
X N1 (Y = N1 * SIN(X) * 100)
0.1
-0.5
0.2
-1.5
The header line defines x values in the first column, some values which are
not shown but only provided for further use (N1) in the second column and a third column
of implicitely defined y values which are calculated by an arithmetic expression.
2. Even all data can be defined implicitely:
==> H: (X = 0.1 TO 1 BY 0.01) (Y = COS(X))
Restriction: Only one y array may implicitely be defined in one header line!
The usual arithmetic rules are applied, brackets are supported.
(See also HELP FUNCTIONS to get a list of available functions.)
II: MODIFICATION OF EXISTING DATA
A common modification of a whole data column may be performed by
adding specifications to the header line.
1. Arithmetic Operations with Constants
A common modification of one column of a data-block may be
defined by an addition to the corresponding header specification.
(==> Y(Data),L2+200
add 200 to the y-values, or
==> X/5
divide the
x-values by 5, or
==> Y*10
multiply the
y-values by 10, or
==> D+-/5
divide the error values
by 5 or
==> Y**-2*3.5+37.7 )
2. Arithmetic Operations with Vectors
Operations with constants can be combined with
operations between data colomns:
==> H: X**2-N1
Y1*Y2*.01+1(exp),LT11 D*Y2,T Y2+X+N1,L0 N1
Header specifications beginning with "N", "Y"
and "X" are allowed
as operands. The unmodified numbers as written in the data
columns
are taken for the calculations!
3. Arithmetic Operations for implicit loops
Linear operations with constants can be performed in
implicit loops in one- or two-dimensional headers:
==> H: (X = 1 TO 128 BY 0.5)*3.7
Y,L3
==> H2: (X = 1 TO 100 BY 1)-0.35*7.2
(Y = 0 TO 20 BY 0.1)*-5
4. Combinations of Data Columns
Arithmetic manipulations between the values of different data
columns may be performed by specifying the header key:
"A" like "Y", but the data
of this array are added to the
"A",
"M" or "Y" data column to the left.
(use "A*-1"
for subtracting the data)
==> H:
X Y,N0 A,L11
"M" like "Y", but the data
of this array are multiplied with
the "A",
"M" or "Y" data column to the left.
(use "M**-1"
for dividing the data)
==> H:
X Y,P1 M**-1,D14
The numbers resulting from an eventual modification
are taken!
With this option histograms can be constructed which
are
situated one upon the other.
Remark for II. 1,2 and 3:
The operations are performed in the sequence they are written:
e.g. "X-3**0.5*-5/Y2" means
"(((X-3)**0.5)*(-5))/Y2".
Brackets are not supported.