new column with running average of existing column
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Samantha Huff
le 7 Mar 2022
Réponse apportée : Star Strider
le 7 Mar 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 commentaires
Réponse acceptée
Star Strider
le 7 Mar 2022
Try this —
T1 = table(randn(20,1))
T1.Var2 = movmean(T1.Var1,[10 10])
.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!