Variable Arguments
Functions can be written to accept or return an indefinite (or 'variable') number of arguments. To do so, use the varargin and varargout variables.
varargout = function myfunc(varargin)
Note that varargout and varargin variables are cell arrays.