how to convert hourly average into monthly??
Show older comments
i have data for hourly. i need the monthly average of the each hour of the day.
eg: date time data
01/03/18 1:00:00 2.365
02/03/18 1:00:00 3.235
03/03/18 1:00:00 10.2655
..............
..............
29/03/18 1:00:00 45.6552
30/03/18 1:00:00 32.2552
31/03/18 1:00:00 15.3565
in this way i need all 24 hours average for a month.
this kind of data is for 4 years.
is there any possible program related to this problem,
if anyone can solve thanks in advance.
this is the data available with me.
but as i mentioned above i need the average of the each hour of the month.
i.e, 01/01/2012 1:00:00+02/01/2012 1:00:00+......31/01/2012 1:00:00.
like this 24 hours for a month and 12 months for a year.

i want to do mean of the first hour values of a month,then second hour values for amonth and so on last hour i.e,23 rd hour mean for a month. i hope you understood my problem,if not i will explain you clearly one more time.
3 Comments
Pawel Jastrzebski
on 23 Mar 2018
You mentioned that you have an 'hourly average' of your data and want to turn them into 'monthly average'.
But in the snippet of data you've provided I can only see 'daily values'.
In order to be able to offer an adequate help, could you provide the actual data you'll be dealing with or at least a portion of it but in the original format?
SD
on 23 Mar 2018
Attach the data itself (representative sample) instead of image; we can't do anything with that.
Accepted Answer
More Answers (2)
Steven Lord
on 23 Mar 2018
0 votes
Razvan Carbunescu
on 1 Apr 2018
If using R2018a and the data lives in a table T with variables 'Time' and 'Data' can accomplish this by using the new groupsummary command:
>> groupsummary(T,{'Time', 'Time'},{'monthname','hourofday'},'mean','Data'}
The above will group both Januarys of 2012 and 2013 together. If you want them separate would use 'month' instead of 'monthofyear'
Categories
Find more on Tables in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


