Hi,

I have searched through the forum and have found a similar problem posted but the solution is not applicable to my case, so I would kindly suggest some recommendations.

The problem is a trace minimization with a matrix quadratic form. However, previous to defining the objective function, I need to define an auxiliary matrix that depends on the optimization matrices which is composed of a quadratic form. I have been thinking on a new reformulation but I cannot find a proper solution.

Any help would be appreciated.

The code is as follows:

```
H = 1/sqrt(2)*(randn(2, 6, 3) + 1i*randn(2, 6, 3));
P = 1;
Q = [0 0 0];
cvx_begin
variable B(6,2,3) complex
expression mse(3,1);
expression C(2,2);
expression aux;
for i=1:3
C = C + H(:,:,i)*B(:,:,i)*B(:,:,i)'*H(:,:,i)';
end
C = C + eye(2);
for i=1:3
mse(i) = trace(eye(2) - B(:,:,i)'*H(:,:,i)'*inv(C)*H(:,:,i)*B(:,:,i));
end
minimize(sum(mse))
subject to
% Constraint C1**********
for j=1:3
for i=1:3
comp(i) = trace(real(H(:,:,j)*B(:,:,i)*B(:,:,i)'*H(:,:,j)'));
end
sum(comp) >= Q(j);
end
% Constraint C2****************
for i=1:3
aux = aux + trace(real(B(:,:,i)*B(:,:,i)'));
end
aux <= P;
cvx_end
```

I have problems whener matrix B appears due to the quadratic form.

Thank you very much for the help!