Mercurial > hg > ishara
annotate arrows/asubsample.m @ 6:0ce3c2070089
Removed duplicate code and fixed doc in timed_action.
author | samer |
---|---|
date | Mon, 14 Jan 2013 14:33:37 +0000 |
parents | 672052bd81f8 |
children |
rev | line source |
---|---|
samer@0 | 1 % asubsample - Arrow to subsample input sequence. |
samer@0 | 2 % |
samer@0 | 3 % asubsample :: natural -> arrow({A},{box(A)},natural). |
samer@0 | 4 function o=asubsample(N) |
samer@0 | 5 o=loop(@barrier,@(sz)0); |
samer@0 | 6 function [y,s]=barrier(x,s) |
samer@0 | 7 if s==0, y={x}; s=N-1; |
samer@0 | 8 else s=s-1; y={}; end |
samer@0 | 9 end |
samer@0 | 10 end |