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

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by