QP with quadratic constraints using fmincon
Show older comments
I have to compute an objective function asfollows :
min q(y) = 0.5*y'*Q*y + f'y
subject to norm(y,2)=1
I am using the following code in matlab
options=optimoptions('fmincon','Algorithm','interior-point');
[x,fval] = fmincon(@(x)(0.5*x'*Q*x + F'*x),x0,[],[],[],[],[], [],@nonlncon,options);
function [c,ceq ] = nonlncon(x )
c = [];
ceq = norm(x,2)-1;
end
Is this formulation correct ?
Accepted Answer
More Answers (0)
Categories
Find more on Quadratic Programming and Cone Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!