Let’s say I have a short vector x = [a,b,c,d,e]; What would be the best way to compute all the difference between members of the vector as:
y = [e-d e-c e-b e-a
d-e d-c d-b d-a
c-e c-d c-b c-a
b-e b-d b-c b-a
a-e a-d a-c a-b];
Thanks in advance
To give that exact matrix, try:
result in this case: