annotate general/funutils/compose.m @ 4:e44f49929e56

Adding reorganised general toolbox, now in several subdirectories.
author samer
date Sat, 12 Jan 2013 19:21:22 +0000
parents
children fbc0540a9208
rev   line source
samer@4 1 function h=compose(f,g)
samer@4 2 % compose - Constructs composition of two functions
samer@4 3 %
samer@4 4 % compose :: (B->C), (A->B) -> (A->C).
samer@4 5 %
samer@4 6 % returns the function h such that h(...) = f(g(...))
samer@4 7
samer@4 8 h=@fg;
samer@4 9 function x=fg(varargin), x=f(g(varargin{:})); end
samer@4 10 end