How to find monthly average from daily data?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
samira jahan
am 21 Sep. 2022
Kommentiert: Star Strider
am 22 Sep. 2022
I have a file of 2000 row and 15 columns.First 3 coulmns contain year, month and day.It has 4 years of data of each day. other 12 cloumns contain my variables.This 12 columns has some missing data also.I want to find the monthly average of each variables of each year in one excel sheet.
0 Kommentare
Akzeptierte Antwort
Star Strider
am 21 Sep. 2022
You will need to combine the year, month, and day into one datetime array, and then replace the individual variables with the datetime array. (This should not be difficult with removevars and addvars.) Then use the table2timetable function to convert it to a timetable and then use the retime function.
2 Kommentare
Star Strider
am 22 Sep. 2022
See the retime documentation section on Aggregate Timetable Data and Calculate Mean Values for an example. With your timetable, you would use 'monthly' instead of 'hourly' as in the documentation example. Other options are in the section on newTimeStep.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Timetables finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!