title: is it possible to use multiple groups with cvpartition in matlab?
body: <p>thank you in advance for the input.  I am using cvpartition to produce sets that I will use for training and validation on some data.  In particular I'm using</p>
  
  <pre><code>c = cvpartition(a,'kfold',5)
  </code></pre>
  
  <p>where a is a single group.  I would like to be able to generate training and testing sets using two groups, say a and b, rather than just a.  In other words I'm looking for something like this</p>
  
  <pre><code>c = cvpartition([a b],'kfold',5)  
  %I haven't tried this; I would like to know ahead of time if this will work
  </code></pre>
  
  <p>Is this possible to do using cvpartition?  If not is there another way that I could easily do this without hard coding a solution?</p>