what I want to do is to do the following in the simplest way in Matlab
let's suppose we have two arrays {1,2,3} {4,5,6}.
The algorithm should give me all bijections:
1-4 2-5 3-6 / 1-4 2-6 3-5 / 1-5 2-4 3-6 / 1-5 2-6 3-4 / 1-6 2-5 3-4 / 1-6 2-4 3-5