Merge data by date

11 visualizzazioni (ultimi 30 giorni)
Ricardo López
Ricardo López il 1 Dic 2020
Risposto: Walter Roberson il 2 Dic 2020
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

Risposta accettata

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

Più risposte (1)

Sindar
Sindar il 2 Dic 2020
Check out groupsummary, specifically this example and this input argument

Categorie

Scopri di più su Tables 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