How do I get a 25-hour running mean for a time series that does not calculate the NaNs? I have an hourly data.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 28 de Mzo. de 2021

1 voto

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 comentarios

Sammy
Sammy el 29 de Mzo. de 2021
It works!! Thank you so much! :D
darova
darova el 29 de Mzo. de 2021

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Oceanography and Hydrology en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 28 de Mzo. de 2021

Comentada:

el 29 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by