06.06.2022 Views

B. P. Lathi, Zhi Ding - Modern Digital and Analog Communication Systems-Oxford University Press (2009)

Create successful ePaper yourself

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

3.10 MATLAB Exercises 129

We multiply G q by H q and take the inverse DFT. The resulting output signal is shown in

Fig. 3.42d. Table 3.4 gives a printout of gk, G q , H q , Y q , and Yk ·

We have already found the 32-point DFT ( G q ) of g(t) in Example C3.2. The MATLAB

program of Example C3.2 should be saved as an m-file (e.g., "c32.m"). We can import

G q in the MATLAB environment by the command "c32". Next, we generate 32-point

samples of H q , multiply G q by H q , and take the inverse DFT to compute Yk • We can also

find Yk by convolving gk with hk .

c32;

q=0 :32; q=q' ;

for m=l : length (q}

if q(m} $>$=0 & q(m) $<$=7 , Hq (m} =l; end

if q(m) $>$=25 & q(m) $<$=31, Hq (m) =l; end

if q(m) $>$=9 & q(m) $<$=23, Hq (m} =0 ; end

if q(m) ==B & q(m} ==24, Hq (m) =0.5; end

TABLE 3.4

No. gk G q H q G q Hq Yk

0 8,000 8.000 0.9285

1 7,179 7.179 1.009

2 5,027 1 5.027 1.090

3 1 2,331 1 2.331 0.9123

4 1 0.000 1 0.000 0.4847

5 0.5 -1.323 -1.323 0.08884

6 0 -1.497 -1.497 -0.05698

7 0 -0.8616 1 -0.8616 -0.01383

8 0 0.000

0.000 0.02933

9 0 0.5803 0 0.000 0.004837

10 0 0.6682 0 0.000 -0.01966

0.5

11 0 0.3778 0 0.000 -0.002156

12 0 0.000 0 0.000 0.01534

13 0 -0.2145 0 0.000 0.0009828

14 0 -0.1989 0 0.000 -0.01338

15 0 -0.06964 0 0.000 -0.0002876

16 0 0.000 0 0.000 0.01280

17 0 -0.06964 0 0.000 -0.0002876

18 0 -0.1989 0 0.000 -0.01338

19 0 -0.2145 0 0.000 0.0009828

20 0 0.000 0 0.000 0.01534

21 0 0)778 0 0.000 -0.002156

22 0 0.6682 0 0.000 -0.01966

23 0 0.5803 0 0.000 0.004837

24 0 0.000 0.5 0.000 0.03933

0 -0.8616 -0.8616 -0.01383

26 0 -1.497 -1.497 -0.05698

27 0 -1.323 1 -1.323 0.08884

28 0.5 0.000 1 0.000 0.4847

29 2.331 1 2.331 0.9123

30 5.027 1 5.027 1.090

31 7.179 7.179 1.009

25

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

Saved successfully!

Ooh no, something went wrong!