ECE 220

Lab #1, Fall 2001

1 Week

  1. The purpose of this lab experiment is to introduce several basic topics about MATLAB:

  2. the ways in which MATLAB stores numbers and performs computations
  3. writing scripts for MATLAB commands
  4. the use of the following MATLAB functions: step, impulse, plot, linspace, lsim, xlabel, ylabel, title, grid, exp, sin, ones.
  5. Generate and plot the signal for t between 0 and 2 seconds using a time resolution of 0.002 seconds. Label the axes and add a title. It is recommended that you put the instructions in a script file (with .m extension) for this and the other parts of the lab.

  6. Repeat part 2 for the signal . Plot the signals x(t) and y(t) on the same graph. Make use of the .* command in MATLAB.

  7. Using the same time vector as before, generate and plot the pulse signal defined by


  8. This part makes use of the lsim function which computes the output signal of a system for a specified input signal. The system is defined by the 2 arrays num_1 and den_1 shown below. Letting x(t) be the input to the system, generate the output signal. Repeat for y(t) and z(t) as inputs. For each input signal, plot the input and corresponding output on the same graph. The syntax for the lsim function is:

    xout = lsim(num_1,den_1,x,t);


    num_1 = [900     18000],      den_1 = [1     85     2250     18000]

  9. Repeat part 5 with num_2 = [66     1320] and den_2 = [1     33     362     1320].

  10. Document your activities and results in a typed report. Include your MATLAB code and your plots. For the two systems defined by {num1, den1} and {num2, den2}, discuss the differences in the output signals for each of the input signals defined in parts 5-6.

Click the icon to return to the Dr. Beale's home page

Latest revision on Friday, May 19, 2006 10:54 AM