Newsletters - MATLAB News & Notes
Using MATLAB to Teach Signal Processing
by James H. McClellan, Jordan Rosenthal, and Ronald W. Schafer
Georgia Institute of Technology / MIT Lincoln Laboratory
Since 1993, we have been developing an introductory course in signal processing that is now required for all electrical and computer engineering majors at Georgia Tech. Our goal has been to connect the mathematics of signal processing to real applications using digital computation. This has led to a textbook/CD package to support the course1. Throughout our work, MATLAB has played a central role. The students use MATLAB to do lab experiments in areas such as music synthesis, image filtering, and digital modulation and detection. We have also used the MATLAB DSP and graphical capabilities to develop multimedia animations and demonstrations that are presented to students either in the form of graphical user interfaces (GUIs) programmed in MATLAB, or animations and movies produced in MATLAB.
The GUIs and movies address all the important concepts in the course, so students can use them to gain visual insights that are not possible from reading a book. We have also developed homework and lab assignments that require use of the GUIs to compare computer-generated results to analytical derivations. Finally, we use the GUIs and movies as lecture aids that allow the instructor to quickly pose alternate cases in response to student questions. Many of these MATLAB GUIs are available for download2 and will be on the CD accompanying a new textbook entitled Signal Processing First. Several of them are discussed here.
Convolution GUIs
We developed two GUIs that illustrate the principle of convolution: CCONVDEMO, for continuous-time convolution, and DCONVDEMO, for discrete-time convolution (Figure 1). One of the trickiest parts of learning convolution is understanding the "flip and slide" viewpoint. Both GUIs support this visualization by letting the user drag the signal horizontally with the mouse. These GUIs include the following features:
- Users can choose from a variety of signal types and set the
signal's parameters. - Signals can be moved horizontally with results displayed in real time.
- A tutorial mode lets students hide convolution results until requested.
- Various plot options enable the tool to be used as a lecture aid.
- DCONVDEMO has a mode that does circular convolution.
![]() |
| Figure 1. Discrete Convolution demo. Click on image to see enlarged view. |
LTI Demos
DLTIDemo and CLTIDemo illustrate the frequency response concept. When the input to an LTI system is a sinusoid of a particular frequency, its output will also be a sinusoid of the same frequency, but with a possible change in its amplitude and phase. Figure 2 shows the GUI for CLTIDemo, the continuous-time demo. As with the convolution GUIs, the formulas for the sinusoids are given in their textual form to solidify the connection between the written and visual representations of the sinusoid.
![]() |
| Figure 2. Continuous LTI System demo. Click on image to see enlarged view. |
Movies and Animations
While GUIs allow active student participation, they can take a long time to develop and require event handling for the interface. Often, complicated theoretical ideas can just as easily be explored using computer animations, which take less time to produce because only one situation is shown.
The animations on the DSP First CD were created using MATLAB scripts and written out in a movie format (QuickTime). Figure 3(a) shows the connection between the time domain, frequency domain, and transform domain for digital filters. Figure 3(b) shows a three-dimensional z-transform with the associated frequency response plot in the inset axis. An arrow traces out the unit circle while the frequency response gets drawn in the inset axes. These animations would have been nearly impossible to create without MATLAB to do the complex calculations and generate the plots.
![]() |
| Figure 3. Two different animation screen shots. Click on image to see enlarged view. |
1. McClellan, J. H., Schafer, R. W., Yoder, M. A., DSP First: A Multimedia Approach, Prentice-Hall, Inc., Upper Saddle River, NJ, 1998
2. http://users.ece.gatech.edu/mcclella/matlabGUIs/index.html


