%% Add timeseries to Collection
% Create a tscollection object containing one timeseries object. Then, add a second timeseries to the collection.

ts1 = timeseries([1.1 2.9 3.7 4.0 3.0]',1:5,...
                 'Name','Acceleration');
ts2 = timeseries([3.2 4.2 6.2 8.5 1.1]',1:5,...
                 'Name','Speed');
tscin = tscollection(ts1);
tscout = addts(tscin,ts2)

% Copyright 2012 The MathWorks, Inc.