title: Create list of vector pairs from all possible permutations of two vectors
body: <p>I'm trying to achieve a relatively simple matrix manipulation in MATLAB.</p>
  
  <p>From two vectors, I would like to generate all the possible two-element pairs that could be produced. For example, given the following two vectors:</p>
  
  <pre><code>a = [1 2 3]
  b = [4 5 6]
  </code></pre>
  
  <p>... I would hope to be able to produce the following:</p>
  
  <pre><code>c =
  
       1     1     1     2     2     2     3     3     3
       4     5     6     4     5     6     4     5     6
  </code></pre>
  
  <p>I understand that I could generate the above using an explicit loop (such as multiple <code>repmat()</code> operations), but my previous experience of MATLAB suggests that there probably is a built-in function that can achieve this more quickly...</p>
  
  <p>Any suggestions?</p>