Mercurial > hg > ishara
view general/funutils/apply.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | fbc0540a9208 |
children |
line wrap: on
line source
function varargout=apply(fn,args) % apply - Apply function to list (cell array) of arguments % % apply :: % (A:typelist(N)->B:typelist(M)) ~'function with N inputs and M outputs', % cell { A:typelist(N) } ~'cell array with N elements of types AX' % -> B{1}, ..., B{M} ~'M return values of types B{1} to B{M}'. [varargout{1:max(1,nargout)}] = fn(args{:});