MATLAB: Why when i make conv between an averaging filter and a noisy circuit it doesn’t get filtered

convolution

n=0:499
x=sin(2*pi*n/50)
y=x+0.1*randn(size(n))
h=[11111]/5
z=conv(h,y)

Best Answer

You need commas between the ones in h:
n=0:499
x=sin(2*pi*n/50)
y=x+0.1*randn(size(n))
h=[1,1,1,1,1]/5
z=conv(h,y)