Mercurial > hg > ishara
annotate general/funutils/returns.m @ 28:673b8e45d05a
Tidied up indentation.
author | samer |
---|---|
date | Sat, 19 Jan 2013 14:40:54 +0000 |
parents | fbc0540a9208 |
children |
rev | line source |
---|---|
samer@9 | 1 function Y=returns(I,F,varargin) |
samer@9 | 2 % returns - Evaluate function and return multiple values in cell array |
samer@4 | 3 % |
samer@9 | 4 % returns :: |
samer@9 | 5 % I:[[M]->[N]] ~'M numbers between 1 and N', |
samer@9 | 6 % (A(1),...,A(L) -> B(1), ..., B(N)) ~'function with L in and N outputs', |
samer@9 | 7 % A(1), ..., A(L) ~'arguments for function' |
samer@9 | 8 % -> cell { B(I(1)), ..., B(I(M)) } ~'selected returns in a cell array'. |
samer@4 | 9 |
samer@4 | 10 Z=cell(max(I),1); |
samer@4 | 11 [Z{:}]=F(varargin{:}); |
samer@4 | 12 Y=Z(I); |