Path: news.mathworks.com!not-for-mail
From: "David Doria" <daviddoria@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Complex Number Covariance Matrix
Date: Tue, 25 Mar 2008 12:18:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <fsaqhp$p6m$1@fred.mathworks.com>
References: <fs983d$ofr$1@fred.mathworks.com> <fs9kjc$6e5$1@fred.mathworks.com> <fsamnv$ha4$1@fred.mathworks.com>
Reply-To: "David Doria" <daviddoria@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1206447482 25814 172.30.248.38 (25 Mar 2008 12:18:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 25 Mar 2008 12:18:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1105197
Xref: news.mathworks.com comp.soft-sys.matlab:459008



So I tried this:

a = 5*rand(10, 1) + i*5*rand(10, 1);
b = 5*rand(10, 1) + i*5*rand(10, 1);

u_a = mean(a);
u_b = mean(b);

a=a-ua;
b=b-ub;

c=corrcoef(a,b)

but the off diagonals are complex numbers - I want a 
positive value between 0 and 1 - is the magnitude a good 
enough value? or is there a better way?

Thanks,

David