Академический Документы
Профессиональный Документы
Культура Документы
2
= cos (2n - 4uut)
x = cos(2n - 4uut) +u.S - cos(2n - 4uuut)
c) Use fft
1
function to compute and plot the magnitude of the DFT of the sequence x. Be
careful of the interval over which the output lies.
d) Apply fftshift function on the result and plot the outputs magnitude. Describe the
difference made.
e) What is the relationship between the computed DFT and the fourier transform of the
continuous-time signal? Plot the magnitude of the fourier transform of the continuous-
time signal as well.
f) Define a function
output_signal=FFT_LP (input_signal,cutoff_frequency,passband_gain)
that implements a discrete-time lowpass filter. The input and output signals are in time
domin and the cutoff frequency is over |u, n]. Use ifft to calculate the inverse fourier
transform (use the symmetric option and explain what it does)
g) Apply this filter on the sequence x and try to diminish the higher frequency component
(4kHz). Plot the result in both time and frequency domains (use fftshift).
2. FIR Filtering
a) Define a vector b|n] as following:
b|n] =
1
4
1. Ideal Filtering
a) Define a vector for the time interval [0,2s] with 44100 points per second (the sampling
rate is 44.1kHz)
b) Generate the following vectors in the above-mentioned time interval and plot the results
over [0,5ms] using stem and xlim (samples of the continuous-time signal) :
m
1 n 4
that represents the impulse response of a moving average system. plot the magnitude and
phase of the fft of the sequence.
b) As you see the result does not look like the DTFT of the sequence. Try to somehow
modify the vector to increase the number of samples given by fft function to over 100.
Plot the magnitude and phase of the fft for the new sequence.
c) Use unwrap function and plot the phase again. Describe the difference made.
1
DTFTofavectorisacontinuousfunctionwithaperiodof2n.DFTofavectorgivesanumberofsamplesofthe
DTFTequaltothelengthofthevectorinthetimedomainandequallyspacedalongtheinterval[0, 2n].Checkout
MATLABshelpforfurtherinformation.