I can't seem to plot a desired output using a Hanning Moving Average equation. My goal is to create a moving average filter with a 3-point moving average with a created signal x. However, I don't notice a difference between the unfiltered signal and the filtered signal. May someone give advice on how to enter a moving average equation and it's coefficients without the use of the filter() function? Or is the 3-point moving average so small that there isn't a difference?
Hanning Moving Average filter:
y[n] = 1/4(x[n] + 2x[n-1] + x[n-2]).
fs = 200;
Ts = 1/200;
t = 0:Ts:1;
x = sin(2*pi*2*t) + sin(2*pi*10*t) + sin(2*pi*90*t)
title('Signal with 2, 10, and 90 Hz');
n = 3
yn = (.25*x(n)) + (.5*x*(n-1)) + (.25*(n-2))