Merge data by date

4 次查看(过去 30 天)
Good afternoon,
I have a big matrix of an hourly consumption of 5 houses for 2 years. The matrix has two columns: one with date in this format: " 2020-10-05 00:00:00 " and the other column as data.
I would like to order the data based on date. So for " 2020-10-05 00:00:00 " the sum of each house. I tried to do it manually but its a long way and I feel that there is a way to do it with a loop more efficiently.
Thanks

采纳的回答

Walter Roberson
Walter Roberson 2020-12-2
Convert your data to a timetable() object, and use retime() to consolidate the information.

更多回答(1 个)

Sindar
Sindar 2020-12-2
Check out groupsummary, specifically this example and this input argument

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by