annotate 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
rev   line source
samer@4 1 function varargout=apply(fn,args)
samer@4 2 % apply - Apply function to list (cell array) of arguments
samer@4 3 %
samer@12 4 % apply ::
samer@12 5 % (A:typelist(N)->B:typelist(M)) ~'function with N inputs and M outputs',
samer@12 6 % cell { A:typelist(N) } ~'cell array with N elements of types AX'
samer@12 7 % -> B{1}, ..., B{M} ~'M return values of types B{1} to B{M}'.
samer@4 8
samer@12 9 [varargout{1:max(1,nargout)}] = fn(args{:});