Tutorial on filtering

Below is shown a signal (top graph), a filter (middle graph), and the filtered signal (bottom graph). The filter consists of the values 0.33, 0.33, 0.33, centred on the origin. This indicates that each point p[x] in the original signal is replaced by 0.33 p[x-1] + 0.33 p[x] + 0.33 p[x+1] in the filtered signal. This is an ``averaging filter.''

Note:What we call ``convolution'' (P * f) in class involves reflecting the filter f before sweeping it across the signal P. Below, the filter f has already been reflected!

Try applying different filters to the signal below. To do so, just edit the ``Filter'' field and press ``Enter.'' You can also change the signal by editing the ``Signal'' field.

If you want to centre your signal or filter on the origin, just include square brackets around one of your data points, like [9]. That data point will sit on the origin. (Make sure that there is no space between the brackets and the number, like [ 9 ], or it won't work.)

To see the filter in action, choose the ``Manual'' setting. Then click and hold anywhere on the graphs. Repeat this to move the filter along.


If see this message, you need to use Java-enabled Web browser to run the applet.

Java source code

(Other applets by James Stewart)