In this example, we design and implement a length
FIR lowpass
filter having a cut-off frequency at
Hz. The filter is
tested on an input signal
consisting of a sum of sinusoidal
components at frequencies
Hz. We'll filter a
single input frame of length
, which allows the FFT to be
samples (no wasted zero-padding).

Figure 8.3 plots the impulse response and
amplitude response of our FIR filter designed by the window method.
Next, the signal frame and filter impulse response are zero-padded out
to the FFT size and transformed:

Figure 8.6 shows the filter output signal in the time
domain. As expected, it looks like a pure tone in steady state. Note
the equal amounts of ``pre-ringing'' and ``post-ringing'' due to the
use of a linear-phase FIR filter.9.5

For an input signal approximately
samples long, this example is
2-3 times faster than the conv function in Matlab (which is
precompiled C code implementing time-domain convolution).