manipulate time (add 10 minutes) in a time series
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I am struggling with a time issue. I have the following meterological data...
'31-Jan-2008 20:00:00' 8.24000000000000
'31-Jan-2008 21:00:00' 8.90000000000000
'31-Jan-2008 22:00:00' 9.10000000000000
'31-Jan-2008 23:00:00' 8.76000000000000
'31-Jan-2008 23:50:00' 8.45000000000000
'01-Feb-2008 00:50:00' 8.12000000000000
'01-Feb-2008 01:50:00' 7.50000000000000
'01-Feb-2008 02:50:00' 7.85000000000000
'01-Feb-2008 03:50:00' 7.05000000000000
The data was originally sampled and reported on the hour (prior to jan 2008 here). However, the time format changed (i.e. in February for the example here) so that the data are now reported 10 minutes before the hour. I would like to maintain consistency with the historical data and report everything as hourly. I have played around with timetable and retime and can get it to interpolate. However, my preference is to add 10 minutes, and round the time up to the next hour. Any suggestions would be much appreciated.
Thanks
Jon
0 Kommentare
Antworten (1)
Monisha Nalluru
am 8 Mär. 2021
From my understading,
You want to add 10 mintues to current date format.
He is the example of addding 10 mintues to existing time
time = datetime(2021,3,8,1,50,0);
time1 = time+minutes(10); % added 10 minutes to existing time
Refer to following documentation:
Siehe auch
Kategorien
Mehr zu Calendar finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!