new column with running average of existing column
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Samantha Huff
am 7 Mär. 2022
Beantwortet: Star Strider
am 7 Mär. 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 Kommentare
Akzeptierte Antwort
Star Strider
am 7 Mär. 2022
Try this —
T1 = table(randn(20,1))
T1.Var2 = movmean(T1.Var1,[10 10])
.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!