%% timeseries after Event
% Create a timeseries object with an event occurring at time sample 2.

tsin = timeseries((1:5)');
tsevent = tsdata.event('MyEvent',2);
tsin = addevent(tsin,tsevent);
tsin.Events

% Create a new timeseries object that contains the data after the event sample.

tsout = gettsafterevent(tsin,'MyEvent');
tsout.Time

% Copyright 2012 The MathWorks, Inc.