title: Return variable number of outputs from mex function
body: <p>Is there any way to return a variable number of outputs from a mex function?</p>
  
  <p>One might pack them into a cell, but I wondered wether there is a way, so that they are expanded directly in the output list. Something like</p>
  
  <pre><code>a = mymex(arg1, arg2);
  
  [a, b, c] = mymex(arg1, arg2, 'all');
  </code></pre>