diff general/funutils/@function_handle/horzcat.m @ 39:c388f1c70669

Updated documentation and fixed some bugs in function algebra
author samer
date Tue, 29 Jan 2013 17:02:00 +0000
parents 9d24b616bb06
children
line wrap: on
line diff
--- a/general/funutils/@function_handle/horzcat.m	Tue Jan 29 15:59:01 2013 +0000
+++ b/general/funutils/@function_handle/horzcat.m	Tue Jan 29 17:02:00 2013 +0000
@@ -1,11 +1,17 @@
 % horzcat - function combinator, 
 %
 % horzcat ::
-%    F:(A{1:N} => B{1:M}),
-%    G:(A{1:N} => C{1:L}),
-%    N:natural,              ~'defaults to nargin(F)'
-%    M:natural               ~'defaults to nargout(F)'
-% -> (A{1:N} => B{1:M}, C{1:L}).
+%    (A{1:N} => B{1}{:}),
+%    (A{1:N} => B{2}{:}),
+%    ...
+% -> (A{1:N} => B{1}{:}, B{2}{:}, ...).
+%
+% [f,g,h,...] is the function which calls f,g,h etc in order
+% with given arguments and returns all their values as multiple
+% return values.
+% eg, [a,b,c]=feval([@zeros,@ones,@eye],2)
+% Returns a=[0,0;0,0], b=[1,1;1,1], c=[1,0;0,1].
+
 function h=horzcat(varargin)
 	funs=varargin;
 	nouts=cell2mat(map(@nargout,varargin));