new column with running average of existing column
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Star Strider
2022년 3월 7일
Try this —
T1 = table(randn(20,1))
T1.Var2 = movmean(T1.Var1,[10 10])
.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!