[Type the abstract of the document here. The abstract is typically a short summary of the contents of the document. Type the abstract of the document here. The abstract is typically a short summary of the contents of the document.] |
Section 2:
The following code was used to calculate perform the DFT Function in Matlab: function sw = dft(st)
% DFT - Discrete Fourier Transform M = length(st);
N = M;
WN = exp(2*pi*j/N); %Main Loop for n=0:N-1 temp = 0; for m=0:M-1 s = st(m+1); temp = temp + (s* (WN ^ (-n*m))); end sw(n+1) = temp; end The DFT function created was performed on the following signals and a graph was plotted using the function stem4.
The function used to display the results was as follows: function stem4(s)
% STEM4 - View complex signal as real, imag, abs and angle subplot(4,1,1); stem(real(s)); title('Real'); subplot(4,1,2); stem(imag(s)); title('Imag'); subplot(4,1,3); stem(abs(s)); title('Abs'); subplot(4,1,4); stem(angle(s)); title('Angle'); end The stem4 function was applied to the DFT function of the following signals.
Uniform Function:
S = ones(1,64)
From the figure above, the Real axis displays a non-zero value at the fundamental frequency; the same is also true when observing the Absolute axis which shows that only a single non-zero value is produced at the fundamental frequency. The Absolute axis displays the result of the Fourier Transform. It is also evident that the angle is changing at a steady rate across the 64 points of the DFT. Delta Function:
S = (1:64) == 1
Only the fundamental frequency, the delta function shown in the above figure provides a non-zero value. The result of the DFT function returns a value of one throughout the whole signal due to the fact that the exponential