Mercurial > hg > ishara
view general/funutils/@function_handle/not.m @ 38:9d24b616bb06
Added function algebra.
author | samer |
---|---|
date | Tue, 29 Jan 2013 15:59:01 +0000 |
parents | |
children |
line wrap: on
line source
function g=not(f,nout) if nargin<2, nout=nargout(f); end if nout<0, error('function must have a definite number of outputs'); end if nargin(f)==1, g=@h1; else g=@hn; end function rets=h1(x), [rets{1:nout}]=f(x); end function rets=hn(varargin), [rets{1:nout}]=f(varargin{:}); end end