02.10.2019 Views

UploadFile_6417

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

162 Chapter 5 THE DISCRETE FOURIER TRANSFORM<br />

5<br />

Magnitude of the DFT: N=128<br />

4<br />

3<br />

|X(k)|<br />

2<br />

1<br />

0<br />

–1<br />

0 20 40 60 80 100 120<br />

K<br />

200<br />

Angle of the DFT: N=128<br />

100<br />

Degrees<br />

0<br />

–100<br />

–200<br />

0 20 40 60 80 100 120<br />

K<br />

FIGURE 5.8<br />

plots<br />

The DFT plots of Example 5.7 for N = 128 are shown as line<br />

□ EXAMPLE 5.8 To illustrate the difference between the high-density spectrum and the<br />

high-resolution spectrum, consider the sequence<br />

x(n) =cos (0.48πn)+cos (0.52πn)<br />

We want to determine its spectrum based on the finite number of samples.<br />

a. Determine and plot the discrete-time Fourier transform of x(n), 0 ≤ n ≤ 10.<br />

b. Determine and plot the discrete-time Fourier transform of x(n),<br />

0 ≤ n ≤ 100.<br />

Solution<br />

We could determine analytically the discrete-time Fourier transform in each<br />

case, but MATLAB is a good vehicle to study these problems.<br />

a. We can first determine the 10-point DFT of x(n) toobtain an estimate of its<br />

discrete-time Fourier transform.<br />

MATLAB Script:<br />

>> n = [0:1:99]; x = cos(0.48*pi*n)+cos(0.52*pi*n);<br />

>> n1 = [0:1:9] ;y1 = x(1:1:10);<br />

>> subplot(2,1,1) ;stem(n1,y1); title(’signal x(n), 0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!