gettsbeforeevent
Create timeseries
before event
Description
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.
Examples
Input Arguments
Tips
When the input
timeseries
objecttsin
contains date character vectors andtsevent
uses numeric time, the time selected bytsevent
is treated as a date that is calculated relative to theStartDate
property intsin.TimeInfo
.When
tsin
uses numeric time andtsevent
uses calendar dates, the time selected bytsevent
is treated as a numeric value that is not associated with a calendar date.
Version History
Introduced before R2006a
See Also
gettsafterevent
| gettsbeforeatevent
| gettsbetweenevents
| timeseries
| tsdata.event