I have the following CVX/MATLAB code:

%%%%%%%%

cvx_precision low % Still extremely accurate, variable bulkSubset(nTxRf)

objective = 0;

for ff = 1:size(H,3)

hPrime = H(:,:,ff);

objective = objective + log_det(eye(nMsAnt) + snrFactor*hPrime*diag(bulkSubset)*hPrime’);
end
maximize( objective )
subject to
lb <= bulkSubset <= ub
%bulkSubset*ones(nTxRf,1) == actTx

sum(bulkSubset) == actTx

cvx_end

%%%%

My objective function “should” be real, but due to machine error…if I insert a breakpoint in the code and calculate log(det(I+snrFactor*hPrime*hPrime’)…I get a complex result. Upon running the code, CVX sometimes says that the optimization failed. Am wondering if I should do something like insert a norm or abs somewhere… or what would CVX allow… or is this complex log_det a non-issue?

Thanks!