When calculating the standard deviation of arrays of complex numbers c, why is std(c) not equal to std(abs(c))?
10 次查看(过去 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.
0 个评论
回答(2 个)
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..)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!