S = withtol(rowTimes, tol)
| Parameter | Description |
|---|---|
| rowTimes | datetime or duration vector, or text converted to datetime. |
| tol | Nonnegative scalar duration. |
| Parameter | Description |
|---|---|
| S | Timetable row subscript. |
withtol creates a row subscript that selects the rows of a timetable whose row times are within tol of the times in rowTimes (bounds included). The rows are listed time by time, in the order of rowTimes.
It can be used in TT(S, vars), TT{S, vars}, TT.name(S), and in assignments and deletions.
The tolerance must be less than half the smallest interval between distinct times of rowTimes, so that no row is selected twice. The times must have the same type as the row times of the timetable.
TT = timetable(seconds([1; 2; 2.05; 3; 4]), (1:5)', 'VariableNames', {'A'});
S = withtol(seconds([2 3.9]), seconds(0.2))
TT(S, :)
TT.A(withtol(seconds(2), seconds(0.1)))
| Version | Description |
|---|---|
| 2.0.0 | initial version |