In FMINCON, nonlinear constraints can be provided as a function argument (nonlcon). I tried to use a similar method in CVX
cvx_begin
variable x(n)
minimize( somefunc(x))
subject to
nonlcon(x)
cvx_end
But I get an error:
Disciplined convex programming error:
Cannot perform the operation: {real affine} ./ {real affine}
In the nonlcon, there is an element-wise division operation. It gives the error at that line and I can't change the constraint to any other way. Is there a way to handle this?