Hi I need some help with creating a function that takes a signal vector as input and computes the five-sample weighted moving average of the signal.

조회 수: 1 (최근 30일)
Here is a small example:
Your signal file consists of a vector y = [0.8, 0.9, 0.7, 0.6, 0.3, 0.4]. We can solve the smoothing problem by making use of a matrix: We first construct a matrix where each row is a shifted and scaled version of the signal, which means that in the first row, y is shifted left twice; in the second row y is shifted left once and multiplied by two; in the third row y is multiplied by three; etc. Summing each column and dividing by 9 yields the final result is: ˆy = [0.54444, 0.7, 0.68889, 0.56667, 0.4, 0.26667].

답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by