creating date for data sorting in time series data

2 次查看(过去 30 天)
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.

采纳的回答

Walter Roberson
Walter Roberson 2017-11-5
If you have R2016b or later, it might be easiest to create a timetable() and use retime()
  4 个评论
Walter Roberson
Walter Roberson 2017-11-6
Note: due to round-off error in constructing the slot boundaries, slot_dns, , it is possible that times very close to a ten-minute boundary might get put into the wrong side of the boundary. If that was important, it could be compensated for.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by