Mercurial > hg > ishara
diff general/funutils/@function_handle/gt.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/gt.m Tue Jan 29 15:59:01 2013 +0000 +++ b/general/funutils/@function_handle/gt.m Tue Jan 29 17:02:00 2013 +0000 @@ -1,3 +1,12 @@ +% gt - select outputs from function +% +% gt :: (A{:}=>B{1:N}), I:[M]->[N]] -> (A{:}=>B{I}). +% +% f>[i,j,k...] is a function which takes the same arguments as f +% but returns the ith,jth,kth etc return values from f as the 1st, 2nd, 3rd etc +% return values. +% eg feval(@eig>2,X) returns the eigenvectors of X. + function g=gt(f,I,nin) if nargin<3, nin=nargin(f); end nout=length(I); MI=max(I);