%% Specify Time Step of Your Own
% Create a timetable that contains times, temperature, and pressure readings taken approximately at the half-hour mark, but with one measurement from 9:00 AM missing.

Time = datetime({'2015-12-18 07:29:53';'2015-12-18 08:00:00';...
                 '2015-12-18 08:31:02';'2015-12-18 09:30:00'});
Temp = [37.3;41.9;45.7;39.8];
Pressure = [30.1;29.9;30.03;29.8];
TT1 = timetable(Time,Temp,Pressure)

%
% Specify a 30 minute time step. Since 30 minutes is not a predefined time step, you must specify it as a duration value, using the 'TimeStep' name-value pair argument. Resample the data from TT1 using linear interpolation.

dt = minutes(30);
TT2 = retime(TT1,'regular','linear','TimeStep',dt)

% Copyright 2012 The MathWorks, Inc.