Mercurial > hg > ishara
view sequences/subseqdata.m @ 29:61921dceded1
More documentation on type system.
author | samer |
---|---|
date | Sat, 19 Jan 2013 17:56:21 +0000 |
parents | b1280319413e |
children | 9e7be347b3a0 |
line wrap: on
line source
function o=subseqdata(X,ranges,varargin) % SUBSEQDATA - Sequence of subranges of a large array % % subseqdata :: % [[N,M]] ~ 'big array', % [[2,K]] ~ 'start and end indices' % -> data [[N,M]]. ~ 'resultant sequence'. o=map(@(r)extract(X,2,r),window(ranges)); if ~allequal(diff(ranges)) && ~isempty(o) o=seq.resize([size(X,1),nan],o); end end function f=allequal(x), f=all(x==x(1)); end