# fir filter - mean delay and snr from difference equation?

I'm trying to get my dsp sea legs a bit, and am trying to complete a problem that asks for the mean delay and expected SNR boost for a given difference equation: y[n] = (x[n] + ... + x[n-N+1])/N

• I'd like to plot the filter function in octave/matlab, but am not sure how to get there from the difference equation. most of the examples I've come across assume that I have a frequency band to specify, but I'm not sure how I can derive that from just the difference equation.
• I'm not sure how to calculate the expected SNR boost in the absence of any info about the noise source. Is it possible to calculate some concept of the amount of 'smoothing' the filter is expected to provide, and consider that to be the reduction in noise between the input and the output?

Thanks for any hints!

$$y[n]=\sum_{k=0}^{N-1}x[n-k]h[k]\tag{1}$$
Comparing (1) to your difference equation, you can easily see what the system's impulse response $h[n]$ is. Once you have the impulse response, you can compute the frequency response using an FFT. Plot its magnitude and phase to see how the filter behaves in the frequency domain.