How can I take moving average with different window shapes?
조회 수: 8 (최근 30일)
이전 댓글 표시
I need to take the sliding window average of a signal/single column matrix using different shapes of moving window (rectangle, blackman harris, etc). So far I can only find ways to take the moving average with a rectangular window (simply taking the moving average of the numbers with a given window size). How can I take the averages through different window shapes?
Thanks
댓글 수: 0
채택된 답변
Rik
2019년 7월 26일
You can use the conv function to calculate the convolution of your window with your data. Just make sure your window has a sum of 1.
You might need to pay special attention to the edges of your data, to make sure conventions conv is using match your expectations.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Blackman에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!