solving constrained optimization with matlab