title: How to wrap a function using varargin and varargout?
body: <p>mini-example:</p>
  
  <pre><code>function varargout = wrapper(varargin)
  varargout = someFunction(varargin);
  </code></pre>
  
  <p>That's how I'd do it first. But for example if <code>someFunction = ndgrid</code> this yields a not defined for cell arrays error, so the next try was using <code>someFunction(varargin{:})</code> instead. That's a successful call, but calling <code>[a,b] = wrapper([1,2], [3,4])</code> does not yield the same result as a direct call to <code>ndgrid</code>, so what am I doing wrong?</p>