# Correlation Coefficient problem

Status
Not open for further replies.

#### abhigopal

##### Member level 3
related:www.rocksolidimages.com/pdf/semblance.pdf

Hi all
My problem is kinda weird. I have two arrays of numbers and I want a pairwise correlation between these two numbers. I use MATLAB 7.0's inbuilt function namely corr.m .. My problem is tht one of these arrays has only real numbers and the other one has only complex numbers. Both these arrays are of equal length.

When I compute the correlation, I get a complex number as my answer. I take the absolute value of the answer and My answer turns out to be greater than 1. But the correlation coeff always has a value between -1 and +1. I also typed out a code for computing the correlation coefficient and ended up with the same result.

Does anyone have any explanations on why this is happening.??

Abhishek

P.S- Moderators, I could not find an appropriate forum for postin this message. If required, please move it to an appropriate forum.. Thanks

#### flatulent

The coefficient may be the complex number you got out of the program. Are the real and the imaginary parts separately within -1 to +1?

#### abhigopal

##### Member level 3
Flatulent,

No, the real and imaginary parts are not lying between 1 and -1. One of them is greater than 1 at times. And if the complex number I got is actually the coefficient, then how would I know the extent upto which the two arrays are correlated.
And, this does not occur in all cases where one array is purely real and another is purely imaginary. Just in some cases..