I have a sort of strange question, but here goes. I have a matrix containing (T11, T12, T21, and T22)...
| T11 T12 |
| T21 T22 |
I have a function that will return a scalar value upon comparison of two values in the matrix. Lets call it f(x,y). And I want to run this function for each two values so I do...
f(T11,T12), f(T11,T21), f(T11,T22),
f(T12,T21), f(T12,T22),
f(T21,T22)
I store these results in a vector, now containing 6 elements
V1 = [f(T11,T12), f(T11,T21), f(T11,T22), f(T12,T21), f(T12,T22), f(T21,T22)]
What I want to do now, is find out which f(x,y) corresponds to which two x,y values. So the vector V1 will contain values, for example:
V1 = [12 14 54 23 86 3]
So you can see that the first index (i=1) of V1 has a value of 15, and corresponds to f(T11,T12), and that the third index (i=3) of V1 = 54, and corresponds to f(T11,T22).
If anything is unclear please let me know. To refresh, I want to be able to determine the original values input into f(x,y) for each value in V1. I have tried looking for patterns and so far have been unable to come up with anything, I forgot a bunch of math I used to know...I'm thinking there is a relationship between the indicies of V1 and the indicies compared in the matrix. Ideas please! (p.s. I also tried including the indicies along with the values in the function return, but its really messy and I would rather do it a fancy mathematical way.