25-hourly mean
조회 수: 1 (최근 30일)
이전 댓글 표시
How do I get a 25-hour running mean for a time series that does not calculate the NaNs? I have an hourly data.
댓글 수: 0
채택된 답변
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)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!