It is easy to see that the following x is generally a semi-definite matrix,(in fact, definite in this special case).
But when I use chol() in the program, the program stops and tells me that "??? Error using ==> chol
Matrix must be positive definite with real diagonal."
Then how to solve this problem? Thank you!
>> x=phi*phi'+Ipsi_1C*Ipsi_1C'+inv(V)*inv(V)'
x =
1.0e+002 *
Columns 1 through 5
0.5655 + 0.0000i 0.0458 + 0.0190i -0.0016 + 0.0295i -0.0181 + 0.0338i 0.0049 - 0.0001i
0.0458 - 0.0190i 2.9353 + 0.0000i -0.0017 + 0.0037i -0.0116 + 0.0449i -0.0048 - 0.0133i
-0.0016 - 0.0295i -0.0017 - 0.0037i 1.0508 + 0.0000i 0.0089 - 0.0063i 0.0052 - 0.0041i
-0.0181 - 0.0338i -0.0116 - 0.0449i 0.0089 + 0.0063i 1.8672 + 0.0000i -0.0035 + 0.0027i
0.0049 + 0.0001i -0.0048 + 0.0133i 0.0052 + 0.0041i -0.0035 - 0.0027i 2.0895 - 0.0000i
-0.0315 - 0.0042i -0.0432 - 0.0430i -0.0065 + 0.0037i 0.0280 - 0.0163i -0.0059 + 0.0111i
Column 6
-0.0315 + 0.0042i
-0.0432 + 0.0430i
-0.0065 - 0.0037i
0.0280 + 0.0163i
-0.0059 - 0.0111i
2.6429