When using CVX to solve the SDP problem in Matlab, what is the difference between defining the Hermitian matrix in the variable or constraint? rix in the variables and constraints?

When using CVX to solve the SDP problem in Matlab. Defining the Hermitian matrix in the variables or defining the Hermitian Matrix in the constraints, the results obtained are inconsistent. Does anyone know the reason or the difference between these two methods?

variable H(N,N) Hermitian semidefinite

or

H==semidefinite(Nu)

Your kind help would be highly appreciated.

You haven’t shown us the variable declaration int the 2nd case. If you don’t declare it as hermitian, you should get a warning message, and it will not be a correct SDP constraint.

What is Nu in the 2ns case? I presume the u is a typo. More care in submitting your questions is in order.