short cut COV applied with complex numbers
조회 수: 1 (최근 30일)
이전 댓글 표시
I have the same troublem using the short cut cov() in MATLAB.
Well, my matrix A is defined as
A = 5.0000 + 2.0000i 3.0000 + 2.0000i
8.0000 + 5.0000i 7.0000 + 3.0000i
And what I am looking for is the best way to apply this equation:
![Screenshot 2019-08-13 at 22.10.04.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/233803/Screenshot%202019-08-13%20at%2022.10.04.png)
I solved by hand and got 4.5 + 7.5i for the element COV(1,2). However, when I used the function cov I got as shown below.
![Screenshot 2019-08-13 at 22.10.47.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/233804/Screenshot%202019-08-13%20at%2022.10.47.png)
And using the equation: 0.5*conj((A-mean(A))') * (A-mean(A)) I received as result:
![Screenshot 2019-08-13 at 22.11.19.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/233805/Screenshot%202019-08-13%20at%2022.11.19.png)
So I would like to know, how should I procede with this situation? Which method fits better?
Thanks in advance for your attention!
댓글 수: 0
답변 (1개)
Maadhav Akula
2019년 8월 20일
From your description, it's a bit unclear on how you want to implement these formulae on matrix A. cov(A) returns the covariance matrix with the corresponding column variances along the diagonal. Please refer the following link on description of covariance(cov) function in MATLAB, to understand how it works :-
Note : In Matlab when you use the transpose operator on a matrix with complex numbers, it gives you a Hermitian (complex-transpose) matrix. So, for getting only the transpose, you must apply the conj function after applying the transpose to the matrix, it seems like that is what you have done in the other equation. Also, in the second equation, it’s a bit unclear why you’re using the multiplication factor of 0.5.
Hope this helps!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!