MATLAB: Computing the average of all each month from all data in time series

mean each month all data

Hi, I have used xls file data..i want to make average data all each month ..for all data in time series ..like mean for all Jun , Mar….from column D. the example in file. * how i can do that*

Best Answer

Hey, I understand that you want the average of each column (representing months).
You can use mean() to do that.
For example if you want average of 2nd,3rd and 4th column you can use
avg=mean(data(:,2:4),2);
This will return a 1X3 matrix with mean of 2,3 and 4 columns respectively.
Note:- I'm assuming you are importing the data as matrix.
For more info on mean() refer mean