Error : {invalid} .* {convex}

I am getting this error when doing:
variable X complex
minimize alpha1 * abs(X-c1)+alpha2 * abs(X-c2)
subject to
atan(imag(X)/real(X))= alpha1 * a1+alpha2 * a2
Where alpha1 and alpha2 are real nonnegative numbers
Error : {invalid} .* {convex}

Please guide me through this. Thanks in advance.

imag(X)/real(X)) is not convex and is not allowed, nor is atan of any CVX variable or expression.

Thank you Mark. Actually the error is coming in the previous line which says “minimize…” . Please tell something about that as well.

You haven’t provided a reproducible problem, complete with all inputs (alpha1, alpha2, c1, c2) . Therefore, I don’t know what went wrong on that line of code.

Edit: Based on the error message, perhaps alpha1 or alpha2 were somehow corrupted, for instance having value NaN , rather than being what you claim to be real nonnegative numbers.