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.resizer([size(X,1),nan],o);
	end
end

function f=allequal(x), f=all(x==x(1)); end
