When calculating the standard deviation of arrays of complex numbers c, why is std(c) not equal to std(abs(c))?

12 次查看(过去 30 天)
for example, when both the real and imaginary components are normally distributed:
c = randn(100,1) + i*randn(100,1);
>> std(c)
ans =
1.5367
>> std(abs(c))
ans =
0.7312
Looking at how Matlab calculates these, it appears that the modulus of c is used in both instances. Am I wrong?
Thanks for your help.

回答(2 个)

michael
michael 2016-10-8
编辑:michael 2016-10-8
Please have a look on Peter's response here
  1 个评论
Adam Parker
Adam Parker 2016-10-8
Michael, I appreciate you taking the time to respond. Thank you.
However, I don't think the Peter's answer gets to the heart of my question - it addresses something slightly different (unless I am missing something?)
My confusion is this: if I look at how the std() function handles a complex number it does the 'squaring' operation by multiplying by the complex conjugate i.e. if c=a+ib then it uses c* x c = a^2+b^2 in its calculation. But this is just the same thing that abs(c) does. So why do you get different answers?
Thanks again.

请先登录,再进行评论。


seackone
seackone 2018-5-1
Hi, I also want to calculate the standard deviation of a complex number.. At my research, I found your question. But std(c) and std(abs(c)) is not the same!
For example:
A = [1+1i*1 1+1i*2]
The mean of A is:
mean(A) = 1/2 * (1+1i*1 + 1+1i*2) = 1+1i*1.5
Now you can calculate the standard deviation..
But std(abs(A)) is an other equation:
abs(A) = [1.412 2.2361]
and the mean:
mean(abs(A)) = 1.8251
you got a different matrix and a different mean, so the result of the standard deviation isn't the same. If you want, you can calculate the example to the end and the results are:
std(A) = 0.70..
std(abs(A)) = 0.58..
I hope I could help (maybe not you, because the post is more then a year old..)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by