Homework Assignment 14
Due Dec. 8, 2004
- Problem 7.15 (a) (b). Do these by hand.
- Problem 7.15 (a) (b) (c) (d). Do these by ifft(fft(x).*fft(v)). Show
that (a) and (b) agree with the hand calculations.
- Problem 7.21. Do signals (i), (ii), (iii), (vi)
- Problem 7.29 (a) (b) (c)
- Download the sound file falling.wav. Read the
file into MATLAB with the command
x = wavread('falling.wav');
The data is recorded at an 8 kHz rate. Make a time vector t with the command
t = (0:length(x)-1)/8000;
- Plot the sound signal x vs the time vector t.
- As in problem 7.21 (a) of the text, find the unit pulse response
hlp[n] of an ideal lowpass filter which has a cutoff
frequency of 400 Hz. (First find the discrete-time frequency which
corresponds to 400 Hz. Note the the discrete time frequency 2 π corresponds
to the continuous time sampling frequency 8 kHz.)
- Let hdlp be the sequence hlp[n]
for n = -100 to 100. Use a stem plot to plot
- Let N = length(x) + length(hd). Plot the magnitude of the
N-point DFT of hdlp vs. continuous-time frequency.
Verify that this filter will pass low frequencies and block high frequencies.
- To find the output of the filter, let xlp be the
linear convolution of x and hdlp. (To do the
linear convolution in MATLAB, take the inverse DFT of the N-point DFT of
x times the N-point DFT of hdlp.)
- Take the N-point DFT of x using the MATLAB FFT command. Plot the
magnitude of the DFT vs. the continuous time frequency.
- Plot the magnitude of the N-point DFT of xlp. Verify
that the low frequencies are gone.
- Repeat (b), (c), (d), (e) and (g) to find xhp using a
high-pass filter with a cutoff frequency of 400 Hz. Note: Once you have
hlp[n], it is very easy to find
hhp[n]. Just use the fact that
Hhp(Ω) = 1 - Hlp(Ω).
- Save your output sounds using the MATLAB wavewrite command:
Listen to the three sound files. Did the filters separate the
low-frequency sounds from the high-frequency sounds?
- If you want to, listen to the effects of the above filters on some of
your favorite music.