title: What is the Matlab/Octave equivalent or R's 'merge' (or 'expand.grid')?
body: <p>I am looking for the Matlab way of doing the following:</p>
  
  <pre><code>&gt; merge(2:4,3:7)
     x y
  1  2 3
  2  3 3
  3  4 3
  4  2 4
  5  3 4
  6  4 4
  7  2 5
  8  3 5
  9  4 5
  10 2 6
  11 3 6
  12 4 6
  13 2 7
  14 3 7
  15 4 7
  &gt; expand.grid(2:4,3:7)
     Var1 Var2
  1     2    3
  2     3    3
  3     4    3
  4     2    4
  5     3    4
  6     4    4
  7     2    5
  8     3    5
  9     4    5
  10    2    6
  11    3    6
  12    4    6
  13    2    7
  14    3    7
  15    4    7
  </code></pre>