How can i create a loop to generate daily averages from a csv. file for over four years and whose data was input at a 15minutes interval?
5 views (last 30 days)
Show older comments
the data looks like this
0 Comments
Accepted Answer
Cris LaPierre
on 1 Sep 2022
Edited: Cris LaPierre
on 1 Sep 2022
Use groupsummary and group the data by 'monthofyear' and 'dayofmonth' and the method set to mean. See this answer:
Here is a simple example
Date = [datetime(2016,6,4)+calyears(0:5)';datetime(2016,6,5)+calyears(0:5)'];
X = rand(size(Date));
Y = rand(size(Date));
Z = rand(size(Date));
tbl = table(Date,X,Y,Z)
out = groupsummary(tbl,["Date","Date"],["monthofyear","dayofmonth"],'mean')
More Answers (0)
See Also
Categories
Find more on Spreadsheets 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!