Time range for timetable row subscripting
S = timerange(
creates a subscript to select rows of a timetable within a range of times.
startTime,endTime
)S
selects all rows whose times are in the time interval
specified by startTime
and endTime
,
including startTime
but not endTime
. In
other words, the time interval is a half-open interval.
startTime
and endTime
are datetime or
duration scalars, or character vectors or strings that specify dates and
times.
If startTime
and endTime
are datetime
values, then you only can use S
to subscript into a timetable
whose row times are datetime values. Similarly, if startTime
and endTime
are duration values, then you only can use
S
to subscript into a timetable whose row times are
duration values.
S = timerange(
creates a subscript over the type of interval specified by
startTime,endTime
,intervalType
)intervalType
. For example, if
intervalType
is 'closed'
, then
S
includes both startTime
and
endTime
in the time range it specifies.
S = timerange(
creates a subscript over the time period between startPeriod,endPeriod
,unitOfTime
)startPeriod
and endPeriod
, using the date or time component specified by
unitOfTime
. For example, if unitOfTime
is 'months'
, then S
includes the start of
the month that is a component of startPeriod
, and the end of
the month of endPeriod
. The inputs
startPeriod
and endPeriod
can be
datetime scalars, or if text, they can be character vectors or strings that
specify dates and times.
S = timerange(
creates a subscript spanning the beginning and end of
timePeriod
,unitOfTime
)timePeriod
, using the date or time component specified by
unitOfTime
. For example, if unitOfTime
is 'day'
, then S
includes the start and
end of the day that is a component of timePeriod
.
containsrange
| overlapsrange
| retime
| synchronize
| vartype
| withinrange
| withtol