If we only look for a feasible solution, we can omit the objective function
optimize(F);
A diagnostic structure is returned which can be used, e.g, to check feasibility as reported by the solver (see yalmiperror for the possible return values)
diagnostics = optimize(F); if diagnostics.problem == 0 disp('Solver thinks it is feasible') elseif diagnostics.problem == 1 disp('Solver thinks it is infeasible') else disp('Something else happened') end