ECE 381: Laboratory 1

Winter 2006

Analog Signals: Operations, periodicity, energy, and power

 


    Part II. Assignment

Matlab notes | Assignment


Useful signal processing routines for this assignment include inline.

1. Write a Matlab script that (a) obtains the even and odd parts of figure P1.1-2 (Figure d) of Problem 1.1-1 and P1.2-2 of Problem 1.2-2, and (b) plot them against the original signals in a 2-by-2 arrangement of subplots. Each row is to depict an original signal, and its even and odd parts in that order. E.g., subplot(2,2,4) depicts the even part of Signal 2. Include subplot titles, or x-/y-axis labels to clearly identify each sketch. Have your script also compute the signal energy for all four signals at hand. Verify that these results comply with the statement that, for an energy signal, the signal energy equals the sum of the energy in its even and odd parts. Explain discrepancies, if any.

Tip 1: For better visualization of finite-duration signals in your plots, make sure that their sampled representation spans an interval larger than the actual signal duration.
Tip 2: Also make sure that the x-/y-axis ranges are adjusted so that the signal form is clearly depicted (neither too small in its window, nor too large to have entire edges coincide with and lost in the window boundary). Check out the
axis routine for that.
Tip 3: You can also annotate each subplot with the signal energy. To do so, you can use the
text or gtext commands, or you can do it interactively through the Insert menu on the figure window.  

2. Let s(t) = sin(πt) Use Matlab to sketch each of the following signals over the range -2 ≤ t≤6 using a small time step (say, 0.02 s). Have your script also compute the signal power.

(a) x(t) = u[s(t)] (b) f(t) = r[s(t)]     (c) h(t) = e s(t)

Present your results, i.e., compose the four sketches, in a convenient manner as in Exercise 1 above. One figure of a 2-by-2 subplot arrangement, or two figures of 2-by-1 arrangement each, it is up to you. Likewise for titles, axes labels, annotations, etc. The same applies to Exercise 3 that follows.

3. Let x(t) = 2u(t+1) – r(t + 1) + r(t – 1). Use Matlab to plot the signals x(t), y(t) = x(2t-1), and f(t) = x(1-2t). Have your script also compute the signal energy for all three. Do the signal energies of y(t) and f(t) relate to that of x(t) as you expect? Explain discrepancies, if any.

For each of the above exercises, turn in all Matlab scripts, plots, and explanations and comments. In this assignment and all others, unless explicitly asked otherwise, you can include your explanations as comment lines at the very end of your scripts. In all cases, your scripts must contain leading comment lines identifying you and the particular assignment/exercise they are written for. Please do NOT write your student ID number there.


School of Computing and Engineering
University of Missouri - Kansas City

Last updated: January 21, 2006