%% Subset of tscollection
% Create a tscollection object from two timeseries objects and extract the data samples corresponding to the 2nd through 4th time values.

ts1 = timeseries(rand(5,1),'Name','ts1');
ts2 = timeseries(rand(5,1),'Name','ts2');
tscin = tscollection({ts1,ts2});

tscout = getsampleusingtime(tscin,2,4);
tscout.Time

% Copyright 2012 The MathWorks, Inc.