I replace " maximize( real( log_det(eye(N) + Sig’*Sig*Qtest1) ));" by " maximize( real(log_det(eye(N) + Sig*Qtest2*Sig’) ));", the CVX give out a better result however it’s “inaccurate/solved”. However, in math, real( log_det(eye(N) + Sig’*Sig*Qtest1) ) is definite equal to real(log_det(eye(N) + Sig*Qtest2*Sig’) ). What’s the problem?

%%%%%%%%%%%%%%%%%

N = 8; % Num of antennas

En = 10;

P = 15;

R = 15;

H = randn(N) + 1i*randn(N);

g1 = randn(N,1) + 1i*randn(N,1);

[U, Sig, V] = svd(H);

cvx_begin

variable Qtest1(N,N) complex semidefinite;

maximize( real( log_det(eye(N) + Sig’*Sig*Qtest1) ));

subject to

%trace(Qtest1) <= P;

real(g1’*Qtest1*g1) <= En;

cvx_end

R_max1 = cvx_optval

cvx_begin

variable Qtest2(N,N) complex semidefinite;

maximize( real(log_det(eye(N) + Sig*Qtest2*Sig’) ));

subject to

%trace(Qtest2) <= P;

real(g1’*Qtest2*g1) <= En;

cvx_end

R_max2 = cvx_optval

figure(1)

mesh(abs(Qtest1))

figure(2)

mesh(abs(Qtest2))