30-day running mean from hourly data
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello, I have a hourly meteorological data as attached. The first column is year, 2nd is month, 3rd is day, 4th is hour and the last is the value. I need to calculate the 30-day running mean from the hourly data and then subtract hourly data from the running mean values. Any help?
댓글 수: 0
채택된 답변
KL
2017년 8월 18일
편집: KL
2017년 8월 18일
dt = datetime([Yrly_slr(:,1:4) zeros(length(Yrly_slr),2)]);
TT = timetable(dt,Yrly_slr(:,5));
TT2 = retime(TT,'monthly','mean')
This is not a 30 day running mean but rather the monthly mean. I hope this is what you intended to do
추가 답변 (2개)
Steven Lord
2017년 8월 18일
You might find the "Sample Points for Moving Average" example in the documentation for the movmean function to be of interest.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!