FUNCTION REFERENCE
retime
Resample or aggregate timetable rows at new times.
Resample or aggregate timetable rows at new times.
Syntax
R = retime(TT,newTimes,method)Syntax
R = retime(TT,'daily',method)Syntax
R = retime(TT,'regular',method,'TimeStep',dt)Syntax
R = retime(TT,'regular',method,'SampleRate',fs)Syntax
R = retime(TT,newTimes)Supported regular grids are secondly, minutely, hourly, daily, monthly, yearly (the latter two require datetime row times), and 'regular' with 'TimeStep' or 'SampleRate'. Supported methods are fillwithmissing (default), previous, next, nearest, linear, spline, mean, sum, min, max, count, firstvalue and lastvalue. Aggregation uses left-closed time bins and omits missing numeric values. Explicit newTimes must be a sorted unique vector of the same time type and zone.
Example
TT = timetable(hours([0;12;24]),[1;3;5]); R = retime(TT,'daily','mean')Differences from MATLAB: Other name-value options, function handles and per-variable methods are not supported. Aggregation and interpolation require real numeric variables. Row times must be sorted; linear and spline require unique input times. Bounded to 16777216 output elements and a conservative 256 MiB resampling workspace.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.