This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Remove tsdata.event objects from timeseries object


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


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

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

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


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')

Introduced before R2006a

Was this topic helpful?