samer@0: function o=subseqdata(X,ranges,varargin) samer@0: % SUBSEQDATA - Sequence of subranges of a large array samer@0: % samer@0: % subseqdata :: samer@0: % [[N,M]] ~ 'big array', samer@0: % [[2,K]] ~ 'start and end indices' samer@0: % -> data [[N,M]]. ~ 'resultant sequence'. samer@23: o=map(@(r)extract(X,2,r),window(ranges)); samer@23: if ~allequal(diff(ranges)) && ~isempty(o) samer@36: o=seq.resizer([size(X,1),nan],o); samer@23: end samer@0: end samer@0: samer@23: function f=allequal(x), f=all(x==x(1)); end