Mercurial > hg > ishara
annotate general/funutils/nthret.m @ 28:673b8e45d05a
Tidied up indentation.
author | samer |
---|---|
date | Sat, 19 Jan 2013 14:40:54 +0000 |
parents | e44f49929e56 |
children |
rev | line source |
---|---|
samer@4 | 1 function X=nthret(I,F,varargin) |
samer@4 | 2 % nthret - Evaluate function and return Nth return value. |
samer@4 | 3 % |
samer@4 | 4 % Usage: |
samer@4 | 5 % |
samer@4 | 6 % if F is a function that returns M >= I values, then |
samer@4 | 7 % X = nthret(N,F,...) |
samer@4 | 8 % evaluates [Z{1:N}]=F(...) |
samer@4 | 9 % and returns Z{N}. |
samer@4 | 10 |
samer@4 | 11 Z=cell(I,1); |
samer@4 | 12 [Z{:}]=F(varargin{:}); |
samer@4 | 13 X=Z{I}; |