delevent

Remove tsdata.event objects from timeseries object

Syntax

ts = delevent(ts,event)
ts = delevent(ts,events)
ts = delevent(ts,event,n)

Description

ts = delevent(ts,event) removes the tsdata.event object from the ts.events property, where event is an event name string.

ts = delevent(ts,events) removes the tsdata.event object from the ts.events property, where events is a cell array of event name strings.

ts = delevent(ts,event,n) removes the nth tsdata.event object from the ts.events property. event is the name of the tsdata.event object.

Examples

The following example shows how to remove an event from a timeseries object:

  1. Create a time series.

    ts = timeseries(rand(5,4))
  2. Create an event object called 'test' such that the event occurs at time 3.

    e = tsdata.event('test',3)
  3. Add the event object to the time series ts.

    ts = addevent(ts,e)
  4. Remove the event object from the time series ts.

    ts = delevent(ts,'test')
Was this topic helpful?