Hello everyone,

I’m trying to solve a basic problem with complex matrix through cvx, the model can be described as follows:

min u’ * M * u

s.t. |ui| = 1, for i = 1~N

and what i write in matlab is (try when N=2):

M = [0.1146 + 0.0191i -0.0591 - 0.0328i

0.0526 + 0.0788i 0.0181 - 0.0813i];

cvx_begin sdp quiet

variable u(2,1);

minimize (real(u’*M*u));

subject to

norms(u) = 2;

cvx_end

and the error i get is:

Error using * (line 258)

Disciplined convex programming error:

Invalid quadratic form: product is complex.

Error in testcvx (line 5)

minimize (real(u’*M*u));

Is that because of the refuse of complex target function in cvx? If not, could anyone help to show how to correct it?

Thanks in advance.

M is not Hermitian semidefinite. In fact, it’s not even Hermitian.

Moreover, norm(u) == 1 (or 2) is a non-convex constraint.

norms(u) = 2 is not what you intended. You intended norms(u) == 2, which will be rejected due to being non-convex constraint. norm(u) = 2.would be rejected as an illegal construct.

Using CVX Beta 3.0 Build 1177,

`minimize(real(u'*(M+M')*u))`

and

`minimize(u'*(M+M')*u)`

were both accepted by CVX, but I don’t know whey they were because M + M’ has eigenvalues -0.0150, 0.2804; hence is indefinite.

However, these are rejected if u is declared complex (which you did not do).

I am interested in what @mcg has to say about why minimize(u’*(M+M’)*u) was accepted. But if u is declared complex, it is rejected.

oh, Mark, thanks for your detail explanations, i got it:grinning: