I have some number of arrays, each arrays has 3 elements, for example with 2 array:
a = {10, 20, 30}
b = {11, 12, 13}
I want to produce the following combination:
combination 1:
a = {10, 20, 30}
b = {11, 12, 13}
combination 2:
a = {10, 20, 30}
b = {13, 11, 12}
combination 3:
a = {10, 20, 30}
b = {12, 13, 11}
combination 4:
a = {30, 10, 20}
b = {11, 12, 13}
combination 5:
a = {30, 10, 20}
b = {13, 11, 12}
combination 6:
a = {30, 10, 20}
b = {12, 13, 11}
combination 7:
a = {20, 30, 10}
b = {11, 12, 13}
combination 8:
a = {20, 30, 10}
b = {13, 11, 12}
combination 9:
a = {20, 30, 10}
b = {12, 13, 11}
etc, which is 36 total combinations. If there are more than 2 arrays, then the combination will be more and more.
I need to get these combinations to add up each of the 1st, 2nd, and 3rd elements to get the results of each element. I have tried this solution but the result is not what i want. I have no idea how to do this.