If you have variables a, band cthat you want to put together somewhere and end up moving to a function as a series of inputs, you can do the following:
inArgs = {a b c}; % Put values in a cell array
foo(inArgs{:});
inArgs{:} , . , :
foo(a,b,c);
foo , , varargin 1- by-3, . , varargin inArgs. foo {:}:
foo(inArgs);
varargin 1 1, inArgs. , foo 1 ( 1 3).