30-day running mean from hourly data
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Poulomi Ganguli
el 18 de Ag. de 2017
Respondida: Nalini KS
el 19 de Jun. de 2020
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 comentarios
Respuesta aceptada
KL
el 18 de Ag. de 2017
Editada: KL
el 18 de Ag. de 2017
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
Más respuestas (2)
Steven Lord
el 18 de Ag. de 2017
You might find the "Sample Points for Moving Average" example in the documentation for the movmean function to be of interest.
0 comentarios
Ver también
Categorías
Más información sobre Tables en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!