Counting bin and averaging using retime to include all of my data

3 次查看(过去 30 天)
I have a question about the reptime function. I'm trying to count a redistributed data every 24 hr, from a data set that is taken every minute.
TT2 = retime(TT1, 'daily', 'count');
"retime" starts counting 24 hours from the first row. The question that I have is that my data set in TT1 does not have complete 24 hour data set at the end, so when I use 'count' the number of points in the last data bit is lower than in TT1.
How can I use retime on all the data set from TT1?
  2 个评论
Akira Agata
Akira Agata 2017-9-6
retime starts counting 24 hours from 00:00:00 of the day in the 1st row, and the total count is equal to the number of row of the input timetable, as shown below. Please tell us more detail of the problem you are facing (attaching .mat file would be quite helpful!).
% Sample timetable
Time = datetime({'2015-12-18 07:02:12';'2015-12-18 08:00:47';...
'2015-12-18 09:01:37';'2015-12-18 10:03:10';...
'2015-12-19 02:59:34'});
Temp = [37.3;41.9;45.7;42.3;39.8];
Pressure = [30.1;29.9;30.03;29.9;29.8];
TT = timetable(Time,Temp,Pressure);
retime(TT,'daily','count')

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Timetables 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by