Basically what I want to do is C[i][j] = B[A[i][j]][i]
. In the case A
and B
are 2 arrays 5x5.
The formula is C [i, j] = B [A [i] [j]] [i] that is, C is the value of B [X] [i], where X is the value of A [i] [j]. Note that the values I have here in the array are within the range of possible [i] and [j], in case of example 3x3 with i and j ranging from 0 to 2.