7.7.1.2 Addition and Subtraction
You can add the elements of two arrays. In the following
statement, the two input lists, first_list% and second_list% ,
must have identical dimensions. The elements of the new list,
sum_list% , equal the sum of the corresponding elements in
the input lists.
MAT sum_list% = first_list% + second_list%
You can also subtract the elements of two arrays. The fol-
lowing program subtracts one array from another:
DIM first_array(30,30)
DIM second_array(30,30)
DIM difference_array(30,30)
.
.
.
MAT difference_array = first_array - second_array
Each element of difference_array is the arithmetic difference
of the corresponding elements of the input arrays.