creating date for data sorting in time series data

2 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Walter Roberson
Walter Roberson il 5 Nov 2017
If you have R2016b or later, it might be easiest to create a timetable() and use retime()
  4 Commenti
Mina Masoud
Mina Masoud il 6 Nov 2017
Thank you so much. I really appreciate that.
Walter Roberson
Walter Roberson il 6 Nov 2017
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.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Shifting and Sorting Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by