CVX ignoring the 'complex' structure defined for a variable

I am getting different answers when specifying the ‘semidefinite’ structure on the optimization variable. I was trying to solve a fairly simple optimization problem when I noticed this glitch. The difference between examples 1 and 2 (mentioned below) is that in example 1, X is defined to be complex semidefinite, and in example 2, X is defined to be complex and is enforced to be semidefinite through the constraint.

I get different answers for both optimization problems, and in example 1, CVX gives out a real valued X completely ignoring the definition that X is complex.

Is this how it has been designed? If yes, could it be added in the manual, please?( I didn’t find it when I looked for it. Pardon me if it is already in there).

Example - 1

M = 5;N=20;
H = cNormrnd(0,1,M,N);
cvx_begin
variable X(N,N) complex semidefinite
maximize log_det(eye(M) + H * X * H' )
trace(X) == M
cvx_end

Example - 2

M = 5;N=20;
H = cNormrnd(0,1,M,N);
cvx_begin
variable X(N,N) complex
maximize log_det(eye(M) + H * X * H' )
X == semidefinite(N);
trace(X) == M
cvx_end

FYI, I am using CVX version 2.1 with MATLAB 2014a.

semidefinite(N) is a real semidefinite matrix. What you want is hermitian_semidefinite(N).

Thanks! Silly of me to not have noticed that.