How calculate daily, monthly, seasonally mean average and std?
Show older comments
Hi everyone,
I'm a new beginner in matlab.
I want to calculate daily, monthly, and seasonally average for time series data.
The first column is date, second column is month, 3rd column is year, 4th column is hour, 5th column is minutes, 6th column is second, and 7th until the end of column is my data.
Could anyone help me how to calculate in daily, monthly, and seasonally average?
Thank you for your help.
Accepted Answer
More Answers (1)
KALYAN ACHARJYA
on 2 May 2020
Edited: KALYAN ACHARJYA
on 2 May 2020
%Load the mat file
%Monthly
len_month=length(unique(data(:,2))); or %use size(data(:,2),1)
monthly_data=sum(data(:,end))/len_month;
Just do the unique on the respective columns and devide by sum(data(:,end)) by the respective length
1 Comment
Aries Dwi Siswanto
on 2 May 2020
Categories
Find more on Data Preprocessing 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!