Hello, I am having trouble in susbtracting elements from column, let's say I have this elements
So I have 5 elements here in this row. Let's assume these are position co-ordinates of different particles in any given space. I want to create pair of each particle with every other particle in the space. To do so I have to find the displacement vector of each pair. 5 particles would form 5c2 pairs i.e 5*4/2 i,e 10 pairs. That would be (A1-A2), (A1-A3),( A1-A4), (A1-A5), (A2-A3),(A2-A4),(A2-A5),(A3-A4),(A3-A5),(A4-A5). I don't want repeating susbtraction like A3-A1 or A5-A4, I want the elements to be substracted from top to bottom or from bottom to top. It should be one way not both ways.
If its possible to do via for loop please post it. Help would be greatly appreciated.