필터 지우기
필터 지우기

25-hourly mean

조회 수: 1 (최근 30일)
Sammy
Sammy 2021년 3월 28일
댓글: darova 2021년 3월 29일
How do I get a 25-hour running mean for a time series that does not calculate the NaNs? I have an hourly data.

채택된 답변

Walter Roberson
Walter Roberson 2021년 3월 28일
movmean(YourData, 25, 'omitnan')
This assumes that YourData has something for every hour (even if NaN.)
If you have less regular data, including the case where your data skips the entries for missing data or where the data is not consistently 1 hour apart, then instead
movmean(YourData, hours(25), 'SamplePoints', Timestamps_for_existing_data)
  댓글 수: 2
Sammy
Sammy 2021년 3월 29일
It works!! Thank you so much! :D
darova
darova 2021년 3월 29일

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Oceanography and Hydrology에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by