Unfortunately, while executing the above code, I encountered an error related to the DCP rules. Notably, the matrix R in the program is Hermitian. Here is the exact error message:
Error using * (line 258)
Disciplined convex programming error:
Invalid quadratic form: product is complex.
Error in main (line 43)
obj = alphaa’Ralphaa;
I would appreciate any assistance or guidance on how to resolve this issue. Thank you.
R has one positive eigenvalue and one negative eigenvalue. Therefore, it is not hermitian negative semidefinite, as is required for obj to be (real) concave.
I.e., your problem is not convex. I have no idea whether you made a mistake in implementing your intended (convex) optimization problem; or your CVX formulation is the problem you really want to solve, in which case it is non-convex, and you need to use a different tool, such as YALMIP.
Dear Mark, thank you for your prompt response. You’re absolutely correct, and I have since revised my approach accordingly. However, I’ve encountered a new error. The objective function is indeed a quadratic convex expression, and maximizing it doesn’t logically hold. The model I’m simulating, according to my references, maximizes a quadratic function subject to modulus constraints. Could you possibly provide any further guidance or recommendations on how to tackle this?
If R is hermitian with both eigenvalues being non-positive, the objective of maximizing alphaa'*R*alphaa will be convex. I have no ideas what your revision was.
Before proceeding further, please CAREFULLY read the link I provided, and follow its guidance,