Oh. I did not know these are non-convex functions. If only CVX gave the error “non-convex constraint” or something. Anyway, could you please advise me on how to write a convex constraint to make my solution lie in the domain of integers?
The message you received is MATLAB’s error message; CVX is not involved, and actually cannot be. In order for CVX to intervene in situations like this, it would be necessary to write special “error-trapping” code code for every single function in MATLAB’s library, even the functions that it cannot and does not support. That is clearly untenable.
So instead, we have an extensive users guide, including a list of functions that CVX does support, and the FAQ linked to above—which actually explains the meaning of the exact message MATLAB gave you. Please read those before you proceed with CVX any further.