Starting from:

$29.99

Assignment 7 MATLAB’s filter toolbox

MATLAB Assignment 7
 Section A
In this assignment, you will reinforce what we did lecture 7 regarding MATLAB’s filter toolbox.
Please submit this homework as a .m file, with suppressed output. Remember that all lectures and
homeworks may be found at github.com/guybaryosef/ECE210-materials. Homework is due by the
end of the semester to guybymatlab@gmail.com.
For each of the following questions, generate filters using either filterDesigner or the filter design
toolbox in the DSP System toolbox. Apply the filter to the signal using step or filter, depending
on how your filter is represented. Lastly, plot the Fourier Transform of the final result using
fft, fftshift, and plot. Refer to the notes for the proper way to use fft and obtain the proper
scaling.
1. Generate a signal that consists of a sum of sine waves of frequencies ranging from 1 to 50 kHz.
Set t to be from 0 to 2 seconds, using an interval of 0.001s:
signal =
50000
X
f=1
sin(2πf t)
2. Create a Butterworth lowpass filter with a sampling frequency of Fs = 100kHz, a passband
frequency of Fpass = 10kHz, a stopband frequency of Fstop = 20kHz, a passband attenuation of
Apass = 5dB, and a stopband attenuation of Astop = 50dB.
3. Create a Chebychev I highpass filter with a sampling frequency of Fs = 100kHz, a passband
frequency of Fpass = 35kHz, a stopband frequency of Fstop = 15kHz, a passband attenuation of
Apass = 2dB, and a stopband attenuation of Astop = 40dB.
4. Create a Chebychev II bandstop filter with a sampling frequency of Fs = 100kHz, a passband
frequency of below the frequency Fpass1 = 5kHz and above Fpass2 = 45kHz, a stopband frequency
of between Fstop1 = 15kHz and Fstop2 = 35kHz, a passband attenuation of Apass = 5dB, and a
stopband attenuation of Astop = 50dB.
4. Create a Elliptic bandpass filter with a sampling frequency of Fs = 100kHz, a stopband
frequency of below the frequency Fstop1 = 15kHz and above Fstop2 = 35kHz, a passband frequency
of between Fpass1 = 20kHz and Fpass2 = 30kHz, a passband attenuation of Apass = 5dB, and a
stopband attenuation of Astop = 50dB.
1

More products