Use the nonlcon parameter of fmincon (I'm assuming here your constraints are nonlinear?). Then A(X)
and B(X)
are fine but for C(X)
it must be in the form c(X) < 0
so you'll need to break it into two constraints of that form.
I pulled this example of how to specify a function for nonlcon
from elsewhere in the documentation:
function [c,ceq]=myNonlinearContraints(x)
%First deal with your nonlinear equalities
c(1) = A(X);
c(2) = B(X);
%Then your inequalities transformed to be in the form ceq < 0
ceq(1) = -C(X);
ceq(2) = C(X) - pi;