title: MATLAB: Split values in column into 1 or 2 additional columns
body: <p>I have a 312x2 matrix representing number of questions answered (column 2) by individual subjects (column 1)
  e.g.</p>
  
  <pre><code>x =
  
      40    56
      41    56
      42   176
      43   176
      44   116
      45    56
      46    56
      47   116
      48    56
      49    56
      50   116
  </code></pre>
  
  <p>Some participants answered the questionnaire more than once, and I would like to divide their data into additional columns.</p>
  
  <p>I.e. participant 43 completed it 3 times - 56 questions once, 60 questions twice.</p>
  
  <p>Therefore, I'd like to split their data into 3 columns, to end up with:</p>
  
  <pre><code>x = 
      40    56
      41    56
      42    56    60    60
      43    56    60    60
      44    56    60
      ...etc
  </code></pre>
  
  <p>I'll then fill in the gaps with NaN so i can work out the mean questions answered per questionnaire.</p>