x = sdpvar(1); y = semivar(1);
F = [1e-6 <= y <= 10];
F = [F, y == abs(x - 3.01)];
obj = (x-3)^2;
optimize(F,obj,sdpsettings('solver','cplex'));
value(x)
value(y)
It seems the correct solution are x = 3 and y = 0.01. But what I get is x = 3.01 and y = 1e-6. Is there something wrong with semivar? Could you please help us take a look?
I use Yalmip version '20180612' , Cplex 128 and Matlab 2018a.
Thank youvery much,
Lun Yang