Documentation

gettsatevent

Newtimeseriesobject with samples occurring at event

Syntax

ts1 = gettsatevent(ts,event)
ts1 = gettsatevent(ts,event,n)

Description

ts1 = gettsatevent(ts,event)returns a newtimeseriesobjectts1with samples occurring at an event ints, where event can be either atsdata.eventobject or a string. When event is atsdata.eventobject, the time defined by event is used. When event is a string, the firsttsdata.eventobject in theEventsproperty oftsthat matches the event name specifies the time.

ts1 = gettsatevent(ts,event,n)returns a new time seriests1with samples occurring at an event in time seriests, where n is the number of the event occurrence with a matching event name.

Tips

When thetimeseriesobjecttscontains date strings andeventuses numeric time, the time selected by theeventis treated as a date that is calculated relative to theStartDateproperty in thets.TimeInfo.

Whentsuses numeric time andevent使用日历日期、时间lected by theeventis treated as a numeric value that is not associated with a calendar date.

Introduced before R2006a

Was this topic helpful?