Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Complex Number Covariance Matrix
Date: Tue, 25 Mar 2008 01:30:20 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 43
Message-ID: <fs9kjc$6e5$1@fred.mathworks.com>
References: <fs983d$ofr$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1206408620 6597 172.30.248.37 (25 Mar 2008 01:30:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 25 Mar 2008 01:30:20 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:458946



"David Doria" <daviddoria@gmail.com> wrote in message <fs983d$ofr
$1@fred.mathworks.com>...
> I have 2 phasors (just complex numbers represented as
> vectors) x and y that are spinning and stretching (so
> changing both the real and imag components).  I take a
> "snapshot" of each of these every time interval (T). (So I
> now have x1, x2, x3...etc and y1, y2, y3, etc...) I would
> like to see how similar x and y were at each time, so I
> think this means I would like to find the sample covariance
> 
> (1/N) * SUM( (x_i-ux)*(y_i-uy) )
>          i
> 
> of x and y where ux=mean(x) and uy=mean(y) where x and y are
> complex vectors (a+bi).
> 
> Is there a way to do this that makes sense?
> 
> Thanks,
> 
> David
----------
  Assuming x and y are complex-valued column vectors of the same length, if 
you compute

 c = cov(x,y,1);

this will give you a 2 x 2 matrix in which the two diagonals are the two 
(biased) variances of x and y, and the two off-diagonal elements c(1,2) and c
(2,1) are the (biased) covariances

 1/n*sum((x-ux)'*(y-uy))  % (Note the conjugate transpose.)

and its complex conjugate, respectively.

  It is up to you to decide if that is what you want as a measure of similarity.  I 
believe that is what is usually meant by the covariance of complex quantities.

  However, I would have thought you would prefer to use correlation values in 
which the above quantities are normalized using the variances.

Roger Stafford