**AIM:**

**ALGORITHM:**

**Step 1:**Start

**Step 2:**Read the first input sequence

**Step 3:**Read the second input sequence

**Step 4:**Perform cross correlation using the xcorr() function

**Step 5:**Plot the sequences

**Step 6:**Display the input & output sequences

**Step 7:**Stop

**SOURCE CODE:**

clc;

clear all;

close all;

x=input('Enter the sequence 1: ');

h=input('Enter the sequence 2: ');

y=xcorr(x,h);

figure;

subplot(3,1,1);

stem(x);

xlabel('n->');

ylabel('Amplitude->');

title('Input sequence 1');

subplot(3,1,2);

stem(fliplr(y));

stem(h);

xlabel('n->');

ylabel('Amplitude->');

title('Input sequence 2');

subplot(3,1,3);

stem(fliplr(y));

xlabel('n->');

ylabel('Amplitude->');

title('Output sequence');

disp('The resultant is');

fliplr(y);

**OUTPUT:**

Click to view full size image! |

**RESULT:**

EmoticonEmoticon