سؤال

Hello i've two complex functions ( size 1x1x2501) and i need to do a correlation between these (cross-correlation).

i've tried to use this command:

[c,lags] = xcorr(Hmimo_tb(1,:)',Hmimo_tb1(1,:)','coeff');

where Hmimo_tb and Hmimo_tb1 are my two signals in which the only difference is the fact that they have been measured in different positions. The difference betweeen these two signals is max equal to 1.5e-13, so they are only affected by noise.

when i use xcorr and i go to analyze the 'c' i find that it is complex so i do:

abs(c)

in this way i have all real value, normalized around the lags 0. My problem is that i have to construct a matrix that has the correlation coefficients. I mean i should have something like this:

M=[1 corr(Hmimo_tb,Hmimo_tb1); corr(Hmimo_tb1,Hmimo_tb) 1] 

where 1 is the corr (Hmimo_tb,Hmimo_tb) for the first on the upper side of the matrix and cor(Hmimo_tb1,Hmimo_tb1) for the other one.

Using the xcorr command i have huge problems in the analysis of the results.First of all i find only one value 1 and a lot of value very close to 0...and this is strange for me since i expected all values around the 0.8, 0.9 or 1....instead i found a lot of values like 0.001 or near this value why? how can i interpretate these values? from theory i know that the correlation parameters are defined as -1<=p<=1 but how is it possible that two functions with a low difference in the plot (i'm talking about 1.5e-13) are not correlated?

Hoping to find a fast help i thank you all.

هل كانت مفيدة؟

المحلول

The fact that you have one "1" value and the rest of the cross-correlation matrix is near zero indicates a very strong cross-correlation. The values are normalized by the power of the two inputs, so it is not given that you will get a "1" in the output. In fact, that indicates that the cross-correlation is nearly perfect. The "near 0's" indicate that they are not strongly correlated at the other phases.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top