How Create Pentad average

5 visualizaciones (últimos 30 días)
MattyK
MattyK el 9 de Jul. de 2019
Comentada: Yash Totla el 9 de Jul. de 2019
Good day.Is there a way to create pentad average in Matlab?. Thanks.

Respuesta aceptada

Yash Totla
Yash Totla el 9 de Jul. de 2019
You can calculate the 5 point moving average using the MATLAB function movmean
pentadAvg = movmean(dataArray, 5)
  2 comentarios
MattyK
MattyK el 9 de Jul. de 2019
Thanks I see the movmean average. But isnt it suppose to give me 5 days averages. For e.g. I am expecting 73 pentads in a year?. The movmean gives me all the 365 days still.
Yash Totla
Yash Totla el 9 de Jul. de 2019
movmean will return the 5 day moving average
pentadAvg(3) = average(day1, day2, day3, day4, day5)
pentadAvg(4) = average(day2, day3, day4, day5, day6)
Are you expecting the following result instead
pentad(1) = average(day1, day2, day3, day4, day5)
pentad(2) = average(day6, day7, day8, day9, day10)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Numeric Types en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by