MATLAB: Constrained minimization where one variable has to be bigger than another

fminconMATLAB

I have a problem using fmincon.
Basically, I want to perform a constrained minimization, and the function I want to minimize has 2 variables.
The problem is that one variable has to be bigger than the other, that is x1 > x2. Is it possible to set such a constraint using this solver?

Best Answer

Yes, you use the A,b inputs
A=[-1,1];
b=0;
Related Question