how to solve constrained optimization problems in matlab