given the list below:
listResult = combnk(1:6,2)listResult = 1 2 1 3 1 4 1 5 1 6 2 3 2 4 2 5 2 6 3 4 3 5 3 6 4 5 4 6 5 6
how could I get an array (5 x 3) with the pairs above so that each row contains all elements of the set (1: 6). ex :
1 2 3 4 5 6 1 3 2 5 4 6 1 4 2 6 3 5 1 5 2 4 3 6 1 6 2 3 4 5
Best Answer