Mercurial > hg > ishara
diff sequences/@seq/window.m @ 3:3f77126f7b5f
First major revision of sequence library, now using classdef form, STILL A BIT BROKEN!
| author | samer |
|---|---|
| date | Wed, 09 Jan 2013 22:22:21 +0000 |
| parents | |
| children | b1280319413e |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sequences/@seq/window.m Wed Jan 09 22:22:21 2013 +0000 @@ -0,0 +1,12 @@ +% window - Window a sequnce of arrays in a given dimension +% +% window :: seq [[N,M]] -> seq [[N]]. +% window :: seq [[N,M]], L:natural -> seq [[N,L]]. +% window :: seq [[N,M]], L:natural, natural ~'hop size' -> seq [[N,L]]. +% +% This is just short for windowdata(...) +% Possible optimisation: +% when the span and hop are much less than the input buffer size +% and the source data does not have an efficient extract method, +% then it is worth caching the source data, ie window(cache(x),...) +function Y=window(X,varargin), Y=seq.window(X,varargin{:});
