Why does error of convex problem below arise?


(Yijie Mao) #1

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


(Mark L. Stone) #2

I got the same error message as you using both CVX 2.1 build 1116 and CVX 3.0beta build 1177. I think this is a CVX bug, perhaps related to Error: inner matrix dimension must agree in cvxprob/eliminate . The good news is that this is a self-contained example (modulo possibly different random numbers, but the same error occurs for several different random number instantiations I tried).


(Yijie Mao) #3

Dear Mark,

Thanks for your kind reply.

Unfortunately, I haven’t got this part of the answer “The good news is that this is a self-contained example (modulo possibly different random numbers, but the same error occurs for several different random number instantiations I tried).”

Could you please explain which random numbers are you referring to?

Thanks a lot.


(Mark L. Stone) #4

Q_0 and H_2 depend on randn.


(Barry) #5

HI, have you solved your problem?


(Barry) #6

Hi, any update to solve this bug?