% For an active-set solver you probably want to solve % % function [x,lambda] = qp(A,b,c,H,x) % % Function to solve the problem % minimize c'x + 0.5 x'H x % subject to A x >= b % You may want to have an optional input argument x for the initial % value of x. % If you choose to solve by an interior method, you may also want % to add slack variables s and Lagrange multipliers lambda which gives % % function [x,s,lambda] = qp(A,b,c,H,x,s,lambda) % % Function to solve the problem % minimize c'x + 0.5 x'H x % subject to A x -s = b % s >= 0