MATLAB: Add time column to matrix with measured values

measurementtime column

I have text file with two columns – temperature and humidity. I have read the file into MatLab matrix. How can I add date/time column to this matrix? Logging started 1/1/2017 13:00:00 and it logged after every 0.5 sec.

Best Answer

T_out = timetable(datetime(2017,1,1,13,0,.5*(0:size(M,1)-1)'),M);