31
Lecture 1 Matlab Exercise Lee-Kang Lester Liu

Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Embed Size (px)

Citation preview

Page 1: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Lecture 1 Matlab Exercise

Lee-Kang Lester Liu

Page 2: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.1

M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate-anti-symmetric parts of a finite-length complex sequence.

Page 3: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.1

What are conjugate-symmetric and conjugate-anti-symmetric ?

M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate-anti-symmetric parts of a finite-length complex sequence.

Page 4: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.1

𝑥𝑒❑ [𝑛 ]=𝑥𝑒

∗ [−𝑛 ]Conjugate-symmetric : Conjugate-anti-symmetric :

𝑥𝑜❑ [𝑛 ]=−𝑥𝑜

∗ [−𝑛 ]

What are conjugate-symmetric and conjugate-anti-symmetric ?

Where * denotes complex conjugate.

M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate-anti-symmetric parts of a finite-length complex sequence.

Page 5: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.1

Any sequence can be expressed as a sum of conjugate-symmetric and conjugate-anti-symmetric sequences.

M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate-anti-symmetric parts of a finite-length complex sequence.

Page 6: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.1

Any sequence can be expressed as a sum of conjugate-symmetric and conjugate-anti-symmetric sequences.

𝑥 [𝑛 ]=𝑥𝑒❑ [𝑛 ]+𝑥𝑜

❑ [𝑛 ]

M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate-anti-symmetric parts of a finite-length complex sequence.

Page 7: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.1

Any sequence can be expressed as a sum of conjugate-symmetric and conjugate-anti-symmetric sequences.

𝑥 [𝑛 ]=𝑥𝑒❑ [𝑛 ]+𝑥𝑜

❑ [𝑛 ]Therefore 𝑥𝑒

❑ [𝑛 ]=12

(𝑥 [𝑛 ]+𝑥∗ [−𝑛 ] )=𝑥𝑒∗ [−𝑛 ] Conjugate-

symmetric

M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate-anti-symmetric parts of a finite-length complex sequence.

Page 8: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.1

Any sequence can be expressed as a sum of conjugate-symmetric and conjugate-anti-symmetric sequences.

𝑥 [𝑛 ]=𝑥𝑒❑ [𝑛 ]+𝑥𝑜

❑ [𝑛 ]Therefore 𝑥𝑒

❑ [𝑛 ]=12

(𝑥 [𝑛 ]+𝑥∗ [−𝑛 ] )=𝑥𝑒∗ [−𝑛 ]

𝑥𝑜❑ [𝑛 ]=1

2(𝑥 [𝑛 ]−𝑥∗ [−𝑛 ] )=−𝑥𝑜

∗ [−𝑛 ] Conjugate-anti-symmetric

Conjugate-symmetric

M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate-anti-symmetric parts of a finite-length complex sequence.

Page 9: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.1

Matlab Exercise

Given x[n] =

M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate-anti-symmetric parts of a finite-length complex sequence.

Page 10: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Question ?

Page 11: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.2

M2.2 : (a) Using program 2_2, generate the sequence shown in Figure 2.23 and 2.24. (b) Generate and plot the complex exponential sequence for using program 2_2.

Page 12: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.2(a)

M2.2 : (a) Using program 2_2, generate the sequence shown in Figure 2.23 and 2.24. (b) Generate and plot the complex exponential sequence for using program 2_2.

Page 13: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.2(a)

M2.2 : (a) Using program 2_2, generate the sequence shown in Figure 2.23 and 2.24. (b) Generate and plot the complex exponential sequence for using program 2_2.

1. Index from 0 to 40

2. A sequence x[n] =

Page 14: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.2(a)

M2.2 : (a) Using program 2_2, generate the sequence shown in Figure 2.23 and 2.24. (b) Generate and plot the complex exponential sequence for using program 2_2.

Page 15: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.2(a)

M2.2 : (a) Using program 2_2, generate the sequence shown in Figure 2.23 and 2.24. (b) Generate and plot the complex exponential sequence for using program 2_2.

1. Index from 0 to 30

2.

3.

Page 16: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.2(b)

M2.2 : (a) Using program 2_2, generate the sequence shown in Figure 2.23 and 2.24. (b) Generate and plot the complex exponential sequence for using program 2_2.

Page 17: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Question ?

Page 18: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.5

M2.5 : Using Matlab to verify the result of Example 2.15.

Page 19: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.5

M2.5 : Using Matlab to verify the result of Example 2.15.

Consider three sequence generated by uniformly sampling the three cosine functions of frequencies 3Hz, 7Hz, 13Hz, respectively:

with sampling rate , that is ,

Page 20: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.5

M2.5 : Using Matlab to verify the result of Example 2.15.

Consider three sequence generated by uniformly sampling the three cosine functions of frequencies 3Hz, 7Hz, 13Hz, respectively:

with sampling rate , that is ,

Using Eq 2.63 and Eq 2.63

Page 21: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.5

M2.5 : Using Matlab to verify the result of Example 2.15.

Consider three sequence generated by uniformly sampling the three cosine functions of frequencies 3Hz, 7Hz, 13Hz, respectively:

with sampling rate , that is ,

Using Eq 2.63 and Eq 2.63

Page 22: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M2.5

M2.5 : Using Matlab to verify the result of Example 2.15.

Consider three sequence generated by uniformly sampling the three cosine functions of frequencies 3Hz, 7Hz, 13Hz, respectively:

with sampling rate , that is ,

Using Eq 2.63 and Eq 2.63 where where where

Page 23: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Question ?

Page 24: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M3.1

M3.1 : Determine and plot the real and imaginary parts and the magnitude and phase spectra of the following DTFT for various value of and .

𝐺 (𝑒 𝑗 𝜔 )= 1

1−2𝛾 (𝑐𝑜𝑠𝜃 )𝑒− 𝑗 𝜔+𝛾 2𝑒−2 𝑗 𝜔0<𝛾<1

Page 25: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M3.1

M3.1 : Determine and plot the real and imaginary parts and the magnitude and phase spectra of the following DTFT for various value of and .

𝐺 (𝑒 𝑗 𝜔 )= 1

1−2𝛾 (𝑐𝑜𝑠𝜃 )𝑒− 𝑗 𝜔+𝛾 2𝑒−2 𝑗 𝜔0<𝛾<1

In z-plane , what are those roots in denominator ?

𝐺 (𝑧 )= 1

1−2𝛾 (𝑐𝑜𝑠𝜃 ) 𝑧−1+𝛾 2𝑧−20<𝛾<1

Page 26: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M3.1

M3.1 : Determine and plot the real and imaginary parts and the magnitude and phase spectra of the following DTFT for various value of and .

0<𝛾<1

Page 27: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M3.1

M3.1 : Determine and plot the real and imaginary parts and the magnitude and phase spectra of the following DTFT for various value of and .

0<𝛾<1

Note : these roots are poles of the transfer function.

Page 28: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Question ?

Page 29: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M3.3(b)

M3.1 : Determine and plot the real and imaginary parts and the magnitude and phase spectra of the following DTFT.

X

Page 30: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Problem M3.3(b)

M3.1 : Determine and plot the real and imaginary parts and the magnitude and phase spectra of the following DTFT.

X

Using Matlab roots function to check its zeros.!!

Page 31: Lecture 1 Matlab Exercise Lee-Kang Lester Liu. Problem M2.1 M2.1 : write a Matlab Program to generate the conjugate-symmetric and conjugate- anti-symmetric

Question ?