필터 지우기
필터 지우기

computing the average of all each month from all data in time series

조회 수: 3 (최근 30일)
nada
nada 2018년 6월 11일
댓글: nada 2018년 6월 12일
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*

채택된 답변

Rishabh Rathore
Rishabh Rathore 2018년 6월 12일
편집: Rishabh Rathore 2018년 6월 12일
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
  댓글 수: 3
Rishabh Rathore
Rishabh Rathore 2018년 6월 12일
I didn't get your point. Do you want the mean of column D?
nada
nada 2018년 6월 12일
yes>>I apologize maybe I did not make the necessary clarification I have a table in xls file containing month and another column D contains values for each month I want an average of the values of each month of all data. the result it be table 2 columns and 12 rows

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by