Create timeseries
before event
tsout = gettsbeforeevent(
returns a tsin
,tsevent
)timeseries
object with samples occurring before the
event tsevent
in the input timeseries
tsin
. The argument tsevent
can be either a
tsdata.event
object or a character vector containing the name
of the event. When tsevent
is a tsdata.event
object, the time defined by tsevent
specifies the time. When
tsevent
is a character vector, the first
tsdata.event
object in the Events
property of tsin
that matches the event name specifies the
time.
When the input timeseries
object tsin
contains date character vectors and tsevent
uses numeric
time, the time selected by tsevent
is treated as a date that
is calculated relative to the StartDate
property in
tsin.TimeInfo
.
When tsin
uses numeric time and tsevent
uses calendar dates, the time selected by tsevent
is treated
as a numeric value that is not associated with a calendar date.
gettsafterevent
| gettsbeforeatevent
| gettsbetweenevents
| timeseries
| tsdata.event