I have a simple and light quadratic programming problem that I need to solve, as following: \begin{align} & \underset{x}{\arg\min} & & \dfrac{1}{2}x^T x-z^T x\\ & \text{subject to} & & \sum_{i=1}^n x_i=1,\\ & & & x_i\geq 0\;\forall i\in\{1,\ldots,n\},\\ & & & x=\left[x_1,\ldots,x_n\right]^T, z=\left[z_1,\ldots,z_n\right]^T. \end{align}
where $z$ is a constant vector.
I know there are methods like barrier method or interior-point method that can be used to solve such a problem, but I feel like this problem probably does not require a complicated method like those?
Is there any light solution that I could use to solve such a problem?
Thanks.
zis a vector without any restrictions. Yes it should bex>=0. Sorry about this. @ErwinKalvelagen – Mar 14 '16 at 01:20quadprog). – Erwin Kalvelagen Mar 14 '16 at 01:46