MATLAB: Table2timetable adding time vector with start- and end date

table2timetable

From the recording software I"m using, I can export my data only using minutes from a reference point but I would like to convert my data to a timetable.
I know the start date and time and end date and time and tried to create a timetable based on that information:
newTimes = [datetime('2018-07-04 21:40:42'):datetime('2018-07-17 10:02:10')];
TT = table2timetable(tblB,'rowTime',newTimes)
The data was recorded in between this time range in a approx. 5 ms interval resutling in approx. 220000000 data points. Can I interpolate all the datetime/ from start and end time somehow assuming that the data was recorded regularly?

Best Answer

The times for a timetable can be either a datetime array or a duration array. Turn your data into a duration array and use it to build the timetable.
v = (1:5:101).';
data = v.^2;
timevector = seconds(v);
A = timetable(timevector, data)