This option allows for a very general matrix manipulation by defining, via equations based on FORTRAN syntax, the new matrix to be created. Both the current internal matrix plus all input (and ouput) .UFM files may be involved.
For example to average two matrices the user would type:
while more complex matrix operations are possible, for example:
transforms an input matrix into its corresponding negative exponential.
In these equations the external .ufm files used for input are denoted by X1, X2, etc, the internal matrix by Y and the output .ufm matrix by Z as shown in Figure 10.2. For example, typing:
would take the average of the (current) internal matrix and the (latest) output .ufm file and store those values as the new internal matrix Y.
The equation can not only use the standard arithmetic operations - add, subtract, multiply, divide and exponentiate - they can also use a number of standard functions, e.g. EXP as illustrated above. The following functions are available:
♦ Exp (X)
♦ Log (X) - natural log
♦ SQrt (X)
♦ Sin (X)
♦ Cos (X)
♦ Tan (X)
♦ Abs (X)
♦ Int (X)
♦ MAX (X, Y, …)
♦ MIN (X, Y, …)
♦ RR (X, Y) - Uniformly distributed random variable whose mean is X and with range X (1-Y) to X(1+Y)
♦ RN (X, Y) - Normally distributed random variable whose mean = X and whose variance = Y.
The random numbers used in the final two options are generated by SATURN using pseudo-random sequences based on an initial seed value (MYSEED) which defaults to a fixed value 12345. If the seed value is unchanged the sequence of numbers generated is always the same. To avoid any problems this may create, post release 11.5.2 the users may create a new seed value using the General Parameters Sub-menu under main sub-menu 1 either explicitly or based on a randomly-generated seed derived from the current time and which guarantees a more “truly random” sequence.
The upper case letters above indicate the minimum number which must be used to denote a function; thus E(X), EX(X) once EXP(X) all have the same affect.
Note that numerical values may be used within the equation written either as “integers” or “reals”, i.e. without or with decimal points.
Open and close brackets may be used as part of the expression (always in pairs!) and follow standard FORTRAN syntax rules. They may be used to clarify the “order” of calculation which again follows standard FORTRAN rules; e.g. operations within brackets always precede operations outside. For example in the expression:
the variables X1 and X2 are always added together prior to exponentiation. This would not be the same as
Users are advised, if in doubt, to carry out several steps with very simple equations which create temporary data columns. For example by first calculating
which might be stored in data column 4 followed by
would have the same effect as above (although the final result might not be in the same data column).