Mercurial > hg > ishara
view general/funutils/multicall.m @ 4:e44f49929e56
Adding reorganised general toolbox, now in several subdirectories.
author | samer |
---|---|
date | Sat, 12 Jan 2013 19:21:22 +0000 |
parents | |
children |
line wrap: on
line source
function varargout=multicall(varargin) % multicall - sequential call to several closures, return values from last % % y=do(f,g,...,h,x) % % equivalent to % f(x); g(x); ...; y=h(x); for i=1:length(varargin)-1 feval(varargin{i}); end if nargout==0, feval(varargin{end}); else [varargout{1:nargout}]=feval(varargin{end}); end end