title: Variable length MATLAB arguments read from variable
body: <p>I have a function with variable arguments, declared in the standard way:</p>
  
  <pre><code>[] = foo ( varargin )
  </code></pre>
  
  <p>and I would like to call it from another function, but specify the arguments programmatically. My best attempt is something like the following:</p>
  
  <pre><code>% bar isn't populated like this, but this is how it ends up
  bar = { 'var1' 'var2' 'var3' }; 
  foo( bar );
  </code></pre>
  
  <p>However, bar is put into a 1x1 cell array, and not interpreted as a 1x3 cell array as I intended. I can't change foo, so is there a workaround?</p>