Averaging value in table grouping by some datetime
Show older comments
URGENT
I Have a table done like this
Date Value
31/12/2015 23:00:00 3
31/12/2015 23:10:00 4
31/12/2015 23:20:00 5
31/12/2015 23:30:00 6
31/12/2015 23:40:00 7
31/12/2015 23:50:00 8
so the dataset contain data taking every 10 minutes during the year 2015 i want to make the mean hourly i.e averaging all value of an hour for instance i want result like this 31/12/2015 23:00:00 where in this case 23:00:00 raprresent the average of all the value taking every 10'
Thanks in advance
1 Comment
MASSODA Frank
on 13 Mar 2020
Edited: MASSODA Frank
on 13 Mar 2020
Answers (1)
Cris LaPierre
on 13 Mar 2020
meanTbl = groupsummary(tbl,"Date","hour","mean","Value")
Categories
Find more on Dates and Time in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!