solve constrained optimization with matlab