
3.3. MATLAB IMPLEMENTATION 41
and is one type of lowpass FIR filter. Figure 3.12 shows the frequency response associated
with MA filters of order N = 3, 7, 15, and 31, for a sample frequency of 48 kHz.
0 3 6 9 12 15 18 21 24
−50
−45
−40
−35
−30
−25
−20
−15
−10
−5
0
5
|H(e
jω
)| (dB)
frequency (kHz)
N = 3
N = 7
N = 15
N = 31
Figure 3.12: Magnitude of the frequency response for MA filters of order 3, 7, 15, and 31.
All of the MA filters shown in Figure 3.12 have a 0 Hz (D.C.) gain of 1 (which equals
0 dB). To ensure that any FIR filter has a D.C. gain of 0 dB, the impulse response h[n]
must sum to 1. The relationship between the D.C. response and the impulse response can
be