0% found this document useful (0 votes)
38 views3 pages

Impulse Response of X

The document discusses the impulse response of systems. It provides theory on convolution and the length of vectors. It then gives two examples of finding the convolution of input and impulse responses: 1) convolving [1 1 2 -1] with [1 1 1 1], and 2) convolving [1 1 1 1] with 2^n for n=1 to 4. Both examples show the input, impulse response, and resulting convolution on subplotted figures. The conclusion restates that the impulse response of the systems were observed using convolution and the length function.

Uploaded by

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

Impulse Response of X

The document discusses the impulse response of systems. It provides theory on convolution and the length of vectors. It then gives two examples of finding the convolution of input and impulse responses: 1) convolving [1 1 2 -1] with [1 1 1 1], and 2) convolving [1 1 1 1] with 2^n for n=1 to 4. Both examples show the input, impulse response, and resulting convolution on subplotted figures. The conclusion restates that the impulse response of the systems were observed using convolution and the length function.

Uploaded by

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

LAB-3

TITLE-IMPULSE RESPONSE OF THE SYSTEM.

THEORY:

CONV- Convolution and polynomial multiplication.


C = CONV(A, B) convolves vectors A and B. The resulting
vector is length LENGTH(A)+LENGTH(B)-1.
If A and B are vectors of polynomial coefficients, convolving
them is equivalent to multiplying the two polynomials.

LENGTH- Length of vector.


LENGTH(X) returns the length of vector X. It is equivalent
to MAX(SIZE(X)) for non-empty arrays and 0 for empty ones.

1. x[n]=[1 1 2 -1]
h[n]=[1 1 1 1]
Find Y[n]

CODE:
x=[1 1 2 -1]
h=[1 1 1 1]
n=0:2:6
subplot(3,1,1)
stem(n,x)
title('impulse response of x')
subplot(3,1,2)
stem(n,h)
title('impulse response of h')
y=conv(x,h)
l1=length(x)
l2=length(h)
N=l1+l2-1
n=0:1:N-1
subplot(3,1,3)
stem(n,y)
title('convolution impulse response')

1
impulse response of x
2

-2
0 1 2 3 4 5 6
impulse response of h
1

0.5

0
0 1 2 3 4 5 6
convolution impulse response
5

-5
0 1 2 3 4 5 6

Figure-1 Impulse respose .

2. x(n)=[1 1 1 1]
h(n)=2^n [n=4]
Find y(n).
CODE:
x=[1 1 1 1]
n=1:1:4
h=power(2,n)
n=0:2:6
subplot(3,1,1)
stem(n,x)
title('impulse response of x')
subplot(3,1,2)
stem(n,h)
title('impulse response of h')
y=conv(x,h)
l1=length(x)
l2=length(h)
N=l1+l2-1
n=0:1:N-1
subplot(3,1,3)
stem(n,y)
title('convolution impulse response')

2
impulse response of x
1

0.5

0
0 1 2 3 4 5 6
impulse response of h
20

10

0
0 1 2 3 4 5 6
convolution impulse response
40

20

0
0 1 2 3 4 5 6

Figure 2-Impulse response of the system.

CONCLUSION- We are observed and plot the impulse response of the system. We know
that CONV and LENGTH function.

You might also like