I have two large matrix, with same dimensions. I want to compare matrix 1 file with matrix 2 file.
The cells where matrix 2 file is greater than matrix 1 file, change those cells in matrix 2 by subtracting
by -5.
Example
Matrix 1
2 3 6 9 12
-3 4 7 -2 -6
3 10 4 8 14
Matrix 2
3 1 5 7 14
-1 7 3 -1 -8
2 6 1 12 18
After comparing matrix 1 and 2, the final matrix 2 would be:
Final Matrix 2 would be:
-2 1 5 7 9
-6 2 3 -6 -8
2 6 4 7 13
You can see that only cells in matrix 2 that is greater than in matrix 1 are compared. When
found greater, the cells in that matrix 2 is subtracted by 5. There can be positive and negative numbers in
the matrix.
Any help will be tremendously appreciated.
The cells where matrix 2 file is greater than matrix 1 file, change those cells in matrix 2 by subtracting
by -5.
Example
Matrix 1
2 3 6 9 12
-3 4 7 -2 -6
3 10 4 8 14
Matrix 2
3 1 5 7 14
-1 7 3 -1 -8
2 6 1 12 18
After comparing matrix 1 and 2, the final matrix 2 would be:
Final Matrix 2 would be:
-2 1 5 7 9
-6 2 3 -6 -8
2 6 4 7 13
You can see that only cells in matrix 2 that is greater than in matrix 1 are compared. When
found greater, the cells in that matrix 2 is subtracted by 5. There can be positive and negative numbers in
the matrix.
Any help will be tremendously appreciated.