next up previous
Next: About this document

EE 547 Project #1 Fall 1999


Assigned: 9/27/99 Due: 10/6/99

Convolution

Getting Started

  1. Run user-setup and select math/matlab/5.3.
  2. Edit your .cshrc file. In the personal customization area, add the line:
    setenv MATLABPATH /home/sigproc/sjreeves/matlab/teaching
    
  3. To make these changes go into effect without having to logout and log back in, type
    % source .cshrc
    
    at the command line of the window in which you are working.
  4. Invoke Matlab by typing matlab at the command line.
  5. To become familiar with some of the ``gee-whiz'' capabilities of Matlab, try running demo and then clicking on ``Mathematical examples'' and then ``Fourier Series''. Pay attention to the text that is generated in the window. This text shows the Matlab commands that were used to generate the examples. You may also wish to explore some of the other examples by clicking on different buttons.
  6. Run intro to get an idea of the basic capabilities of Matlab.
  7. You can type doc at any time to get a hypertext version of the Matlab Reference Guide or help <cmd> to get help on specific commands.

Exercises

  1. Write a Matlab function to generate a square-wave waveform (alternating between an amplitude of 0 and A) of length L samples, period T samples, and on for S samples per period. By learning from the triangular waveform function example in Matlab for DSP, it is possible to write this function in one line. (This is not necessary for full credit.)
  2. Create a vector of length 1 representing an impulse (delta1 = [1];). Create a square wave sq1 of length 55, period 5, and height 1 that is on for 3 samples per period.
  3. Use conv to convolve sq1 and delta1. Plot the result using stem.
  4. Create another vector representing an impulse but of length 10 (delta2 = [1 zeros(1,9)];). Convolve delta2 with sq1 and plot the result. Explain any differences that you observe.
  5. Reverse the order of delta2 and sq1 in the conv command, and plot the result. Does this make any difference? Explain.
  6. Let y[n] = (x[n] + x[n-1]). Find the impulse response of this system analytically.
  7. Create a flat impulse response hn2 that is two points long (hn2 = [ones(1,2)];). Convolve hn2 with sq1. Increase the length of the impulse response to 5, 9, and 15. What happens to the result as the length of the impulse response is increased? Explain.
  8. Let . Let . Determine analytically, explaining each step. Check your result using Matlab. Explain how you checked the result.

Write a short report describing your findings. The report should contain a concise description of your results. Include listings of your function. Be sure to answer all questions. Do not include more than four plots in your report. You are not expected to include in the report all plots which you were required to do; instead, you should summarize in your report the salient features of the unincluded plots.

For further help:





next up previous
Next: About this document



Stan Reeves
Fri Sep 24 09:16:34 CDT 1999