MATLAB: How to solve this problem? Error using == Quadratic constraints not supported

MATLABoptimizationsolve

Hi everyone
I have a optimazation problem using "optimproblem". The problem is constraint. The constraint I need is x*x + y*y ==1.
x = optimvar('x');
y = optimvar('y');
prob = optimproblem;
prob.Objective = (((x*((K*x)+(K*y)))+(y*((K*x)+(K*y)))) - ((2*F*x))+((2*F*y)));
prob.Constraints.cons1 = x*x + y*y == 1;
sol = solve(prob);
The error messages as follows
Error using ==
Quadratic constraints not supported.
error in ….. (Line 237)
prob.Constraints.cons1=x*x + y*y ==1;
could you help me to fix this problem?
Thanks! Intho

Best Answer

QP = Quadradic Programming = Quadradic objective function and linear constraints.
QCQP = Quadratically Constrained Quadratic Programming = Quadradic objective function and quadradic constraints.
quadprog() solves QP problems, but you are defining a QCQP problem. QCQP can be solved using the combination of quadprog() and fmincon() as described in the following:
Related Question