0% found this document useful (0 votes)
61 views14 pages

Signals and Systems Lab File: Experiment 4

This document summarizes an experiment performed in Octave to analyze discrete-time signals and systems using convolution. It includes 4 questions exploring convolution properties of different sequences. Question 1 convolves two sequences, question 2 uses impulse sequences, question 3 uses step sequences, and question 4 verifies properties like commutativity and distributivity. The final question finds the convolution of a unit step function and delayed unit step with a sine function for various delays.

Uploaded by

ABHISHEK RATHOUR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views14 pages

Signals and Systems Lab File: Experiment 4

This document summarizes an experiment performed in Octave to analyze discrete-time signals and systems using convolution. It includes 4 questions exploring convolution properties of different sequences. Question 1 convolves two sequences, question 2 uses impulse sequences, question 3 uses step sequences, and question 4 verifies properties like commutativity and distributivity. The final question finds the convolution of a unit step function and delayed unit step with a sine function for various delays.

Uploaded by

ABHISHEK RATHOUR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

SIGNALS AND SYSTEMS LAB FILE

EXPERIMENT 4
SOFTWARE USED : OCTAVE

Q 1 Find out the convolution of x(n) and h(n) finite time discrete
sequences :

(a) x(n) = [ 1 2 5 4 3 ] & h(n) = [ 1 2 5 4 3 ]

CODE :

COMMAND WINDOW :
>> x = [1 2 5 4 3] ;
>> n1 = -2:2 ;
>> h = [1 2 5 4 3] ;
>> n2 = 0:4 ;
>> [y,n] = conv_m(x,n1,h,n2) ;
OUTPUT :

1
(b) x(n) = [ 2 4 6 8 10 ] & h(n) = [ 1 3 5 7 9 ]
CODE : same as (a)
COMMAND WINDOW :
>> x = [2 4 6 8 10] ;
>> n1 = -2:2 ;
>> h = [1 3 5 7 9] ;
>> n2 = -1:3 ;
>> [y,n] = conv_m(x,n1,h,n2) ;
OUTPUT :

2
Q 2 Find out the convolution of x(n) and h(n) finite time discrete
sequences :
CODE :

COMMAND WINDOW :
>> [x,n] = impseq(-1,4);
>> h = 2.*x;
>> [y,n] = conv_m(x,n,h,n);
OUTPUT :

3
Q3 Find out the convolution of x[n] = n*[ u[n] - u[n-3] ] and h[n] = n^2
*[ u[n] - u[n-6] ] :
CODE :

COMMAND WINDOW :
>> [x1,n1] = stepseq(0,3,-1,8) ;
>> x = n1.*x1 ;
>> [x2,n2] = stepseq(0,6,-1,8) ;
>> h = n2.^2.*(x2) ;
>> [y,n] = conv_m(x,n1,h,n2) ;

4
OUTPUT :

Q4 Using the following three sequences, verify the above properties :


x1(n) = n*[u(n+10) - u(n-20)]
x2(n) = cos(0.1*pi*n)*[u(n) - u(n-30)]
x3(n) = (1.2)^n*[u(n+5) - u(n-10)]
CODE :

PROPERTY 1 : x1(n)*x2(n) = x2(n)*x1(n)

5
>> [x10,n1] = stepseq(-10,20,-15,35);
>> x1 = n1.*x10;
>> [x20,n2] = stepseq(0,30,-15,35);
>> x2 = cos(0.1.*3.14.*n2).*x20;
>> [y,n] = conv_m(x1,n1,x2,n2);
>> [y,n] = conv_m(x2,n2,x1,n1);
OUTPUT :

PROPERTY 2 : [x1(n)*x2(n)]*x3(n) = x1(n)*[x2(n)*x3(n)]


>> [x30,n3] = stepseq(-5,10,-15,35);

>> x3 = (1.2.^n3).*x30;

>> [y0,n0] = conv_m(x1,n1,x2,n2);

>> [y,n] = conv_m(y0,n0,x3,n3);

>> [y0,n0] = conv_m(x2,n2,x3,n3);

6
>> [y,n] = conv_m(x1,n1,y0,n0);

OUTPUT :

PROPERTY 3 : [x1(n)+x2(n)]*x3(n) = x1(n)*x3(n) + x2(n)*x3(n)


>> x4 = x1+x2;
>> [y0,n0] = conv_m(x4,n1,x3,n3);
>> [y0,n0] = conv_m(x1,n1,x3,n3);
>> [y,n] = conv_m(x2,n2,x3,n3);
>> stem(n,y+y0);
OUTPUT :

7
PROPERTY 4 : x(n)*del(n-n0) = x(n-n0)
>> [x,n] = impseq(5,-15,35);
>> [y0,n0] = conv_m(x1,n1,x,n);
>> stem(n+5,x1);
OUTPUT :

8
Q 5 : Find convolution x(t) = u(t) + u(t-N) and h(t) = sin(t) for 0 <= t <= pi
and take 50 samples of this signal for N =5:10:75 :
CODE :

OUTPUT :

9
10
11
12
ABHISHEK RATHOUR
191210003
GROUP 1

13
14

You might also like