In my problem, the optimization variable is **V**, which is a 6*2 matrix.
In optimization target function and constraints, the term **V*V**’ is included.

Here is part of my first edition code:

cvx_begin

variable V(6,2)

expression X(6,6)

X = VV’;H3’) );

expression power

power = trace(V’V);X

maximize( log_det(eye(2) + H3

subject to

A - H1XH1’ == semidefinite(n);

B - H2XH2’ == semidefinite(m);

power <= power_constraint;

cvx_end

In the code above, **A B H1 H2 H3** are matrix of legal size.

And there is an error:

Disciplined convex programming error:

Invalid quadratic form: must be a scalar.

X = V*V’;

So in my second edition, code is modified

cvx_begin

variable V(6,2)

expression X(6,6)

for k=1:6

for kk=1:6

*X(k,kk) = V(k,V(kk,:)’;

end

end

expression power

power = trace(V’V);X

maximize( log_det(eye(2) + H3H3’) );X

subject to

A - H1H1’ == semidefinite(n);X*H2’ == semidefinite(m);

B - H2

power <= power_constraint;

cvx_end

The different part is in bold. And I think **V(k, V(kk,:)’* is a scalar, so there should be no error.

Unfortunately, error again:

error using cvx/quad_form (line 211)

The second argument must be positive or negative semidefinite.

X(k,kk) = V(k,:)*V(kk,:)’;

Actually, I don’t understand what this error mean. Since **X(k,kk) = V(k, V(kk,:)’* is a scalar, what does the semidefinite mean?

Or who can help me to describe my problem in a legal way?

Thanks a lot!