Mercurial > hg > ishara
view arrows/@estates/construct.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | 672052bd81f8 |
children |
line wrap: on
line source
function u=construct(s,sizes_in) u=construct(s.base,sizes_in); s0=u.get_state(); u.sizes_out = [u.sizes_out,size(s0)]; u.process = mkproc(u.process, nargout(s.base), ... u.get_state,s.period); end function f=mkproc(g,nout,getst,period) k=1; f=@proc_nnn; function varargout=proc_nnn(varargin) varargout=cell(1,nout+1); [varargout{1:nout}]=g(varargin{:}); if k==1, k=period; varargout{nout+1}={getst()}; else k=k-1; varargout{nout+1}={}; end end end