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

tsin = timeseries((1:5)',1:5);
tsout = getsampleusingtime(tsin,2,4);
tsout.Data

% Copyright 2012 The MathWorks, Inc.