EXP3
EXP3
EXP3
PROGRAM:
clc;
close all;
clear all;
x=input('enter input sequence');
h=input('enter impulse response');
y=conv(x,h);
subplot(3,1,1);
stem(x);
xlabel('n');ylabel('x(n)');
66 | P a g e
title('input signal')
subplot(3,1,2);
stem(h);
xlabel('n');ylabel('h(n)');
title('impulse response')
subplot(3,1,3);
stem(y);
xlabel('n');ylabel('y(n)');
title('linear convolution')
disp('The resultant signal is');
disp(y)
linear convolution
INTPUT:
enter input sequence[1 4 3 2]
enter impulse response[1 0 2 1]
The resultant signal is
1 4 5 11 10 7 2
OUTPUT:
67 | P a g e
CONCLUSION:
In this experiment convolution of various signals have been
performed Using MATLAB
Applications:
Convolution is used to obtain the response of an LTI system to an arbitrary input
signal.It
is used to find the filter response and finds application in speech processing and radar
signal processing.
Excersize questions: perform convolution between the following signals
1. X(n)=[1 -1 4 ], h(n) = [ -1 2 -3 1]
2. perform convolution between the. Two periodic sequences
x1(t)=e-3t{u(t)-u(t-2)} , x2(t)= e -3t for 0 ≤ t ≤ 2
RESULT:
VIVA QUESTIONS:
1. Define Convolution
2. Define Properties of Convolution
68 | P a g e
10. AUTO CORRELATION AND CROSS CORRELATION BETWEEN SIGNALS AND
SEQUENCES
AIM: To compute auto correlation and cross correlation between signals and sequences
EQUIPMENTS:
PC with windows (95/98/XP/NT/2000).
MATLAB Software
THEORY:
Correlations of sequences:
It is a measure of the degree to which two sequences are similar. Given two real valued
Sequences x(n) and y(n) of finite energy,
Convolution involves the following operations.
1. Shifting
2. Multiplication
3. Addition
These operations can be represented by a Mathematical Expression as follows:
Cross correlation
PROGRAM:
% Cross Correlation
clc;
close all;
69 | P a g e
clear all;
x=input('enter input sequence');
h=input('enter the impulse suquence');
subplot(3,1,1);
stem(x);
xlabel('n');
ylabel('x(n)');
title('input signal');
subplot(3,1,2);
stem(h);
xlabel('n');
ylabel('h(n)');
title('impulse signal');
y=xcorr(x,h);
subplot(3,1,3);
stem(y);
xlabel('n');
ylabel('y(n)');
disp('the resultant signal is');
disp(y);
title('correlation signal');
OUTPUT:
70 | P a g e
PROGRAM:
% auto correlation
clc;
close all;
clear all;
x = [1,2,3,4,5]; y = [4,1,5,2,6];
subplot(3,1,1);
stem(x);
xlabel('n');
ylabel('x(n)');
title('input signal');
subplot(3,1,2);
stem(y);
xlabel('n');
ylabel('y(n)');
title('input signal');
z=xcorr(x,x);
subplot(3,1,3);
stem(z);
xlabel('n');
ylabel('z(n)');
title('resultant signal signal');
71 | P a g e
OUTPUT:
CONCLUSION:
In this experiment correlation of various signals have been
performed Using MATLAB Applications:it is used to measure the degree to which the two signals are similar
and it is also used for radar detection by estimating the time delay.it is also used in Digital communication,
defence applications and sound navigation Excersize questions: perform convolution between the following
signals 1. X(n)=[1 -1 4 ], h(n) = [ -1 2 -3 1]
2. perform convolution between the. Two periodic sequences x1(t)=e-3t{u(t)-u(t-2)} , x2(t)= e -3t for 0 ≤ t ≤ 2
RESULT:
VIVA QUESTIONS:
1. Define Correlation
2. Define Auto Correlation and Cross Correlation
3. What is the Difference Between Convolution& Correlation
72 | P a g e