필터 지우기
필터 지우기

Extract month values (rows) out of year matrix

조회 수: 2 (최근 30일)
Luke McLellan
Luke McLellan 2018년 7월 27일
다시 열림: Walter Roberson 2018년 12월 22일
Hi there,
I have a matrix that contains 1 years worth of data (where the elements correspond to date x time) ranging from the 1st January to 31st December; each row represents 1 day of data. Is anyone aware of a method to average each column over each month? Any help would be appreciated.
Thanks
Luke

답변 (1개)

jonas
jonas 2018년 7월 27일
https://se.mathworks.com/matlabcentral/answers/317655-calculate-avergae-values-per-hour-day-month-and-year
I suggest using Sean de Wolski's answer with datetime and retime
  댓글 수: 1
Luke McLellan
Luke McLellan 2018년 7월 27일
Thanks. I have seen this before but could not get it working. I believe it is because I am dealing with data directly, meaning that each data point in the matrix is representative of a date and time. Whereas, the example is clearly split into Year Month ... format.

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

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by