gettsbeforeatevent
Newtimeseries
object with samples occurring before or at event
Syntax
ts1 = gettsbeforeatevent(ts,event)
ts1 = gettsbeforeatevent(ts,event,n)
Description
ts1 = gettsbeforeatevent(ts,event)
returns a newtimeseries
objectts1
with samples occurring at and before an event ints
, where event can be either atsdata.event
object or a string. When event is atsdata.event
object, the time defined by event is used. When event is a string, the firsttsdata.event
object in theEvents
property ofts
that matches the event name specifies the time.
ts1 = gettsbeforeatevent(ts,event,n)
returns a newtimeseries
objectts1
with samples occurring at and before an event in time seriests
, where n is the number of the event occurrence with a matching event name.
Tips
When thetimeseries
objectts
contains date strings andevent
uses numeric time, the time selected by theevent
is treated as a date that is calculated relative to theStartDate
property ints.TimeInfo
.
Whents
uses numeric time andevent
使用日历日期、时间lected by theevent
is treated as a numeric value that is not associated with a calendar date.