-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complex diagonal elements of APA' #404
Comments
Is the general "contract" of these matrix wrappers to leave the underlying data untouched? |
This is indeed a problem. See JuliaLang/julia#17367 |
@StefanKarpinski FYI: it seems that MATLAB does no "post-processing". >> m = 2;
>> n = 3;
>> A = randn(m,n) + 1j*randn(m,n);
>> p = abs( randn(n,1) );
>> A * diag(p) * A'
ans =
2.8503 - 0.0000i -2.1165 + 0.4488i
-2.1165 - 0.4488i 10.8608 - 0.0000i
>> ishermitian( A * diag(p) * A' )
ans =
logical
0
>> chol( A * diag(p) * A' )
Error using chol
Matrix must be positive definite with real diagonal. |
@andreasnoack Thanks very much for the cross-reference. I like the idea of using |
This was closed by JuliaLang/julia#17367. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Suppose
P
is a real square diagonal matrix, thenAPA'
should be Hermitian with real diagonal elements. There is however a chance for some diagonal elements to have nonzero imaginary parts.Enforcing
Hermitian
(e.g. as input forcholfact
) will end up with the following error.A work-around could be to re-assign the diagonal elements to their real parts, but that would also slow things down.
The text was updated successfully, but these errors were encountered: