new column with running average of existing column
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Samantha Huff
il 7 Mar 2022
Risposto: Star Strider
il 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 Commenti
Risposta accettata
Star Strider
il 7 Mar 2022
Try this —
T1 = table(randn(20,1))
T1.Var2 = movmean(T1.Var1,[10 10])
.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Data Types in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!