Program the following Digital Signal in MATLAB Discrete Fourier Transform (DFT)
ID: 2079621 • Letter: P
Question
Program the following Digital Signal in MATLAB
Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT) The DFT of a sequence x(n) with length N is defined: X[k] = sigma^N - 1_n = 0 x[n]W^kn for each k = 0, 1 ..., N - 1 Where W = e^-j(2 pi/N) The inverse DFT is given by: x[n] = 1/N sigma^N - 1/n =0 X[k]W^-kn for each n = 0, 1, ..., N - 1 The Fast Fourier transform (FFT) is an efficient algorithm to compute the DFT. Use 'fft' function to calculate the Fourier Transform of a sequence, x = [1, 2, 3, 4, 5, 6, 7, 8]. Use 'ifft' function to calculate the inverse Fourier Transform of the result you get in (a). Re-do (a) and (b) using your own DFT and inverse DFT functions.Explanation / Answer
x=[1 2 3 4 5 6 7 8 ];
for n=1:2
y=fft(x);
disp('the fast fourier transform is'); disp(y);
g=ifft(y);
disp('the inverse fast fourier transform is'); disp(g);
if g==y
disp('Hence proved');
end
x=input('next sequence');
end
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.