Convert data from minutes to hourly average

1 次查看(过去 30 天)
My data has time set up as dd-month-yyyy hh:mm:ss How do I average my data from minutes to hours

回答(1 个)

Mohammad Sami
Mohammad Sami 2020-10-8
If your data is in timetable / table format. You can use the groupsummary to summarise your data into any intervals.
a = groupsummary(TT,"Column_w_datetime","hour","mean");
  2 个评论
Marina Minic
Marina Minic 2020-10-8
Thanks. In the answer you posted, do I just put "hour", or does that need to be replaced with something?
Mohammad Sami
Mohammad Sami 2020-10-8
Yes hour will provide hourly average. There are also other options if you want to change the interval.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by