And you need to keep in mind that fmincon insists that you formulate all of your functions in terms of one variable, x, so you would have x = x(1) and y = x(2). See Writing Scalar Objective Functions.
In general, ga is not as reliable a solver as fmincon. So if you have smooth objective and constraints, you should use fmincon. See Table for Choosing a Solver.
Best Answer