# [SOLVED]Comparison of signals.

Status
Not open for further replies.

#### electricalpeople

##### Newbie level 6
Hi, I have two estimated(separated)signals and a reference signal. One of the estimated signal is quiet same as the reference signal. I was trying to compare the estimated signals with the reference signal and want know which signal is what. I tried using the correlation but did not work properly. The following shows the steps of cross correlation that I used,

c1 = xcorr(S1,shat(1,);
c2= xcorr(S1,shat(2,);
c11=sum(c1); c22=sum(c2);
if c11>c22
dn=shat(2,;
else
dn=shat(1,;
end

Is this correct what I did? Someone please suggest some ideas for comparison of the signals. I am totally lost here...Thanks in advance.

#### barry

What is xcorr? I ASSUME you're using MATLAB? And I THINK what you want to do is find the PEAK of the two correlations, not the sums. Thus, the one with the higher peak is the one that is more closely correlated.

electricalpeople

### electricalpeople

Points: 2

#### electricalpeople

##### Newbie level 6
Yes, I am using the matlab. Xcorr is the cross-correlation. How do I find the peaks? Could you be please be clear here? Thanks for the reply.

---------- Post added at 18:57 ---------- Previous post was at 18:05 ----------

Thank you Barry. I got it what you meant. It worked. Thank you so much.

Status
Not open for further replies.