Σάββατο 31 Μαΐου 2008

Correlation between Two Finite Signals

Algorithm 1:
Cross correlation is defined as, if x(n) and h(n) are finite signals then cross correlation
In cross correlation folding of h(n) doesn’t occur.
Input the first sequence.
Input the second sequence
3. Find the cross correlation of these sequences using the MATLAB function "xcorr(x,h)" where x and h are the sequences to be correlated.
Plot the result
Program
% Program to find correlation of two signals
x=input ('Enter the first sequences ');
h=input(' Enter the second sequences ');
c= xcorr(x,h);
t=0 : (length(x) +length(h)-2);
stem(t,c);
-------------------------------------------------------------------

Δεν υπάρχουν σχόλια: