new column with running average of existing column
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Samantha Huff
el 7 de Mzo. de 2022
Respondida: Star Strider
el 7 de Mzo. de 2022
I am trying to create a new column that has the average of the 10 data points before and after that time point from an existing column (peak heights). Obviously there will be some difficulty for the first 10 and last 10 rows.
0 comentarios
Respuesta aceptada
Star Strider
el 7 de Mzo. de 2022
Try this —
T1 = table(randn(20,1))
T1.Var2 = movmean(T1.Var1,[10 10])
.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical 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!