필터 지우기
필터 지우기

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

조회 수: 16 (최근 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에서 Dijkstra algorithm에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by