MATLAB: How to calculate hourly average value for measured Temperature, CO2, RH and Rid in 5 minutes interval

hourly average valueMATLAB

Hello all.
Hopfully you all stay well and safe.
I have Temperature, CO2, RH and Rid measured each 5 minutes interval for about 36 days, (from 09/04/2020 to 14/05/2020) about 10080 rows in total. From these data I need to calculate the hourly average value for these measured Temperature, CO2, RH and Rid which means that eventually I must have 24 hourly averaged values per day.
I would appreciate any ideas on the matter!
I have attached the excel file I'm working on.
Regards

Best Answer

The loop below breaks up you time stamps into hours and creates a new vector with the mean value for each hour of the provided data.
Temp = data1(:,4);
i = 12:12:840;
for k = 1:length(i)
DailyAvg(k) = mean(Temp((i(k)-11):i(k)));
end