N_t=4;

N_r=2;

Pt=10;

Q_0=cov(randn(N_t,N_t));

H_2=(randn(N_r,N_t)+j*randn(N_r,N_t))/sqrt(2);

cvx_begin

variable Q_p(N_t,N_t) complex

```
R_1=real(log_det(eye(N_r)+H_2*Q_0*H_2'+H_2*Q_p*H_2'));
R_2=real(log_det(eye(N_r)+H_2*Q_p*H_2'))-real(trace(Q_p));
maximize( R_1+R_2)
subject to
real(trace(Q_p))<= Pt
Q_p == hermitian_semidefinite(N_t); % Q_0 is positive semidefinite
```

cvx_end

To solve the above convex problem, the error below shows. I am confused.

Error using *

Inner matrix dimensions must agree.

Error in cvxprob/eliminate (line 137)

P = P * cvx_invert_structure(

xR );

Error in cvxprob/solve (line 18)

[ At, cones, sgn, Q, P, dualized ] = eliminate(

prob, true, shim.dualize );

Error in cvx_end (line 88)

solve( prob );

Error in main_algo2 (line 104)

cvx_end