Friday 27 November 2015

Auto Correlation Program for matlab?




 To write a program for Auto Correlation for the given sequence using MATLAB
Step 1: Start
Step 2: Read the input sequence
Step 3: Perform auto correlation using the xcorr() function
Step 4: Plot the sequences
Step 5: Display the input & output sequences
Step 6: Stop
SOURCE CODE:

clc;

close all;
clear all;
x=input('Enter the sequence 1: ');
y=xcorr(x,x);
figure;
subplot(2,1,1);
stem(x);
ylabel('Amplitude->');
xlabel('n->');
title('Input sequence');
subplot(2,1,2);
stem(fliplr(y));
ylabel('amplitude');
xlabel('n->');
title('Output sequence');
disp('the resultant is ');
fliplr(y);

 FOR MORE DETAILS CLICK HERE

No comments:

Post a Comment