x = sdpvar(1,1);
Obj = x^2;
Constraints = [x>=0, x<=1];
options = sdpsettings('solver', 'fmincon', 'fmincon.algorithm', 'interior-point', 'usex0', 0.5);
sol = optimize(Constraints, Obj, options);
The solver gives the correct solution, but it always shows that
Your initial point x0 is not between bounds lb and ub; FMINCON shifted x0 to strictly satisfy the bounds.
Since I already put the initial point to be 0.5, what I understand is that Yalmip/Fmincon does not automatically recognize x>=0, x<=1 as the lower and upper bounds. Should I manually put lb and up somewhere in the code to avoid this warning and start the algorithm at 0.5? It seems that there is no
fmincon.lb or fmincon.ub. Thanks a lot.