title: How to generate all bijections of two sets in Matlab?
body: <p>what I want to do is to do the following in the simplest way in Matlab</p>
  
  <p>let's suppose we have two arrays {1,2,3} {4,5,6}.</p>
  
  <p>The algorithm should give me all bijections:</p>
  
  <p>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</p>