MATLAB: Creating date for data sorting in time series data

data sortingtime series

Hi everyone,
I have a time series of sea level with unevenly time interval as you can see in the following:
10-03-2014 17:05 -26.86
10-03-2014 17:07 -26.85
10-03-2014 17:09 -26.85
10-03-2014 17:11 -26.86
10-03-2014 17:13 -26.85
10-03-2014 17:15 -26.87
10-03-2014 17:17 -26.86
10-03-2014 17:19 -26.86
10-03-2014 17:21 -26.86
10-03-2014 17:23 -26.86
10-03-2014 17:25 -26.86
10-03-2014 17:27 -26.85
10-03-2014 17:29 -26.86
10-03-2014 17:31 -26.84
10-03-2014 17:33 -26.85
10-03-2014 17:35 -26.86
10-03-2014 17:41 -26.86
10-03-2014 17:45 -26.87
10-03-2014 17:47 -26.88
10-03-2014 17:49 -26.87
10-03-2014 17:55 -26.87
10-03-2014 17:57 -26.84
10-03-2014 17:59 -26.86
10-03-2014 18:01 -26.83
10-03-2014 18:03 -26.83
10-03-2014 18:05 -26.83
10-03-2014 18:07 -26.84
10-03-2014 18:11 -26.84
10-03-2014 18:13 -26.86
now I want to have data in every 10 minutes. I think that it's good that I generate the data every 1 minutes and after that I just keep the data every 10 minutes. so I want to generate the data every one minutes and if we do not have data in that time the code write nan instead.
Kindly someone helps how to do this. Many many thanks in advance.

Best Answer

If you have R2016b or later, it might be easiest to create a timetable() and use retime()
Related Question