Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

DSP Assignment 0 Matlab Warmup (CLO-3)

Name : ___________________ 2K14-EE- ______ Section _____


Due Date: _________________ Submission Date: __________

Problem 1: Signal Plotting in Matlab

a) Carefully see the following functions and write their mathematical expressions.

2 1

1 0.5

0 0

-1 -0.5

-2 -1
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2

1 1.2

1
0.8
0.8

0.6
0.6

0.4
0.4

0.2
0.2
0

0 -0.2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2

b) Plot these signals in Matlab.

Problem 2: Manipulating Polynomials in Matlab

[i]. Let () = 1 () 2 () = (1 + 2 2 )(1 + 4 1 + 2 2 + 3 3 ). Compute () by


multiplying two polynomials 1 () and 2 ().
The convolution property of z-transform 1 () 2 () 1 ()2 () shows that polynomial
multiplication is equivalent to convolution. Hence, verify the answer of part (a) by using conv()
function of Matlab.

[ii]. According to Example 3.4.2 of [Proakis-2007]:


1 3 7 15 31
() = = 1 + 1 + 2 + 3 + 4 +
3 1 2 4 8 16
1 2 1 + 2 2
1
() = = 2 2 + 6 3 + 14 4 + 30 5 + 62 6 +
3 1 1 2
1 2 + 2
Verify these results using deconv() function of Matlab which is used for polynomial division.

[iii]. Consider the polynomial division:


5 3 2 + 6 310
= (5 2 + 19 + 76) +
4 4
Verify these results using deconv() function of Matlab.
[iv]. According to Example 3.4.4 of [Proakis-2007]:
11 1 1 1
1 + 3 1 + 2 + 3
() = 6 3 1
= (1 + 2 ) + 6
5 1 5 1
1 + 1 + 2 1 + 1 + 2
6 6 6 6
Verify these results using deconv() function of Matlab.

[v]. Find the derivative of polynomial 2 3 + 2 3 + 1. Verify the results using polyder().

[vi]. In Example 3.4.7 of [Proakis-2007]:


( 1)2 ()
2 = [ ] = 3/4
=1
Verify the answer using polyder() and polyval().

[vii]. Find the poles (roots of denominator polynomial) of following () using roots():
1 + 1
() =
1 1 + 0.5 2
2
[viii]. A particular () contains zeros at 1 = cos ( 3 ) , 2 = 0.5 /4 , and 3 = 0.5 /4 . Find
the numerator polynomial using poly().

[ix]. Consider a filter (3rd order IIR LPF) described by the following system function:
0.05634(1 + 1 )(1 1.0166 1 + 2 )
() =
(1 0.683 1 )(1 1.4461 1 + 0.7957 2 )
Compute the magnitude response of the above filter at 2000 points spanning the complete unit circle.
Use freqz()and plot the magnitude response on linear scale.

[x]. Repeat part (ix) and plot the magnitude response on dB scale.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = =

You might also like