Example : suppose I am solving an optimization problem where x should be within 1 and 10 or 29 and 99. The feasible space for x is from 1 to 10 and 29 to 99.
This can be expressed using the mixed integer linear constraints,
where b is an additional unknown binary variable that you must include in your design vector. Since only ga and intlinprog support mixed integer constraints, you would have to use whichever of those is applicable to your objective function.