MAT TRANSFORM has two different forms:
MAT TRANSFORM <matrix file> BY <function of X#>
transforms each element of the matrix according to <function of X#>.
For example to take natural logarithms of all elements of A, activate
MAT TRANSFORM A BY LOG(X#)
MAT TRANSFORM <X_matrix> BY <Y_matrix> AND <function of X#,Y#>
transforms each element X# of <X_matrix> by <function of X#,Y#>
where Y# is the corresponding element of <Y_matrix>.
For example, to divide each element of A by the corresponding element of
B, activate
MAT TRANSFORM A BY B AND X#/Y#
Besides current elements (X#,Y#), both forms of MAT TRANSFORM permit
referring to current row and column indices by I# and J#, respectively.
For example, a 10*10 matrix R of the form
1 r r^2 ... r^9
r 1 r ... r^8
r^2 r 1 ... r^7
... ...
r^9 r^8 r^7 1
where r=1/2, can be created by MAT operations
11 * r=1/2
12 *MAT R=CON(10,10)
13 *MAT TRANSFORM R BY r^abs(I#-J#)
M = More information on MAT operations