isregular
Tests whether a timetable has evenly spaced row times.
Category: Language Fundamentals > Data Types
Syntax
tf = isregular(TT)
Returns true if the row times of TT are sorted, unique and equally spaced.
Description
A regular timetable has a constant step between consecutive row times, as in a signal sampled at a fixed rate. Irregular ones come from event logs or missed samples. Some operations, such as retime with a fixed rate or lagging by a duration, are simpler on regular data.
Input arguments
TT- A timetable.
Output arguments
tf- Logical scalar.
Example
Regular and irregular row times
a = timetable(seconds([0;1;2]), [1;2;3]);
b = timetable(seconds([0;1;3]), [1;2;3]);
isregular(a)
isregular(b)
Output
ans = logical
1
ans = logical
0