What is the difference between the following codes


#1

The following codes are intended to do the same optimization, but I get different results. any suggestion why?
The first code:

cvx_begin SDP
variables delta nu(m) ita(m) w(m)  
variable M(m,m) symmetric 
minimize(norm(delta))
subject to
nu>=0;
w>=0;
ita<=1;
ita>=0;

[M ita;ita' 1] >= 0;
[G.*M ita+nu-w;(ita+nu-w)' 2/beta1*(delta-w'*e+ita'*e)]>=0;
cvx_end  

W=X*(y*y')*diag(ita)*(ita+nu-w)/beta1

The second code:

cvx_begin SDP
variables delta nu(m) ita(m) w(m)  M(m,m)
minimize(norm(delta))
subject to
nu>=0;
w>=0;
ita<=1;
ita>=0;
[sym(M) ita;ita' 1] >= 0;
[sym(G.*M) ita+nu-w;(ita+nu-w)' 2/beta1*(delta-w'*e+ita'*e)]>=0;
cvx_end  

W=X*(y*y')*diag(ita)*(ita+nu-w)/beta1

Which one is a better form under CVX?


(Dinh) #2

I believe this is due to the fact that

sym(G.M) \neq sym(G.sym(M))

where . denotes the element wise product.


#3

Thank you for your reply. Good point.