How should I describe this problem in CVX?

In my problem, the optimization variable is V, which is a 62 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’;
expression power
power = trace(V’V);
maximize( log_det(eye(2) + H3
X
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,:slight_smile:V(kk,:)’;
end
end
expression power
power = trace(V’V);
maximize( log_det(eye(2) + H3
XH3’) );
subject to
A - H1
XH1’ == semidefinite(n);
B - H2
X*H2’ == semidefinite(m);
power <= power_constraint;
cvx_end

The different part is in bold. And I think *V(k,:slight_smile: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,:slight_smile: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!

It’s possible you may be able to convert the constraints to semidefinite form, but you’ll need to go to the source for information on how to do that, I suspect.

That said, trace(V'*V) is actually just sum_square(vec(V)), which is a valid convex expression. So assuming the rest of the problem is convex, that particular term should not be an issue.