# My SDP problem shows "infeasible"

below is my formulation, and I think it is a SDP. R, C, Ra+C are all semidefinite.

min trace(R*W)

s.t. trace(C*W)<=e

trace((Ra+C)*W)>=delta

W>=0

and here is my code:

cvx_begin quiet

variable W(M,M) hermitian

minimize( trace(R*W) )

trace(C*W) <= 0.1

trace((Ra+C)*W) >= delta

W==semidefinite(M)

cvx_end

the result shows “infeasible”, which I really don’t know why…

Thanks a lot!!!

I suspect you meant for `W` to be Hermitian semidefinite, but you have constrained it to be real semidefinite instead. Change the `semidefinite` command to `hermitian_semidefinite`.

Even better, use semidefinite programming mode and avoid these kinds of mistakes altogether. Just use `cvx_begin sdp` and `W >= 0` instead.

Thank you very much, mcg!

but there’s still the problem…

cvx_begin sdp

variable W(M,M) hermitian

minimize(trace((Ra+C)*W))

trace(C*W) <= 0.05

trace((Ra+C)*W) >= 1

W>=0

cvx_end

But it is still infeasible…

I tried to use

variable W(M,M) hermitian semidefinite

it can be “solved” but W is NaN…

Try other solvers and see if they give the same answer. If they do, trust them.

Feasibility obviously depends on values of Ra and C which you haven’'t provided us. For example, if M=Ra=C=1, then by 1st constraint, W <= .05, which renders 2nd constraint infeasible. Same thing can happen in higher dimensions.