CIS 558 / Linguistics 525
Computer Analysis and Modeling of Biological Signals and Systems
Homework 3
Due: 2/14/2003
Linear Shift-Invariant Systems
- (Oppenheim and Shafer 1989 p. 68). The system T in the figure below is
known to be time-invariant. When the inputs to the system are x1[n], x2[n]
and x3[n], the responses of the system are y1[n], y2[n], y3[n] respectively.
- Could the system T be linear? Explain.
- If the input x[n] to the system T is delta[n] (i.e. a unit impulse
at time 0), what is the system response y[n]?
- Determine all possible inputs x[n] for which the response of the system
T can be determined from the given information alone.
- (Oppenheim & Shafer 1989 p. 69) The system L in the figure below is
known to be linear. When the inputs to the system are x1[n], x2[n], x3[n],
the response is y1[n], y2[n], y3[n] respectively.
- Could the system L be time-invariant? Explain.
- If the input x[n] to the system is delta[n], what is the system response?
- Create a vector of length 24 containing an impulse at location 5, a step
edge at location 12, and a unit-slope ramp starting from location 18. Convolve
this signal with the ``two-point averager'': [0.5, 0.5], and the
``two-point differencer'': [0.5,-0.5]. How does the differencer respond
to the various features?
- Show that the two convolution results computed above may be added together
to reconstruct the original signal. Would this be true for an arbitrary input
signal?
- Write a Matlab function mksine to construct a vector of samples
of a sine function. The function should take arguments size, period,
amplitude, and phase. The phase should be measured from
the first sample (that is, the first sample is at the origin).
- Compute the convolution of each of two 24-sample sinusoids of period 24
and period 4 with the two filters described above. Note the amplitude of the
results. What can we conclude about this ``decomposition''?
- Load images ``al'' and ``ron''. Compute a 3-point horizontal weighted average
of al using the kernel [ 0.25 0.5 0.25 ]. Compute a similar 3-point
vertical average.
- Now convolve with both filters (sequentially). What equivalent single 2D
convolution would produce the same result (give the convolution kernel, and
show that the result is the same)?
- The result of this convolution may not look so different from the original,
but try subtracting it from the original. What equivalent single 2D convolution
would have produced this result?
- Take the result of the previous part (difference of original and average),
and compute the following binary image:

Could we have computed it via a single convolution?
- Write a function mksine2 that constructs an array of samples from
a 2D sine wave. This function should take similar arguments, but will require
both xsize and ysize, and should also take an angular argument
direction specifying the normal direction of the sine wave.
- Construct a matrix that will represent the action of a shift-invariant linear
system (the non-zero elements of) whose impulse response is [1 2 3]', on an
arbitrary seven-element input vector. (Hint: the input vector will have the
dimensions 7x1; the matrix will thus have to have the dimensions Nx7, where
'N' is chosen so that the result will have the right size for the consequences
of convolving a seven-element vector (the input) with a three-element vector
(the impulse response).
- Write a MATLAB function that will imitate the basic behavior of the built-in
function conv(a,b), but will accomplish it by constructing a matrix M out
of 'b' and then multiplying 'a' by M. How does 'b' appear in the rows and
columns of M?