I've been struggling with the parameterization of quadprog function in Matlab for a problem like this:
where x is a matrix of x 0 w 0 +x 1 w 1 +x 2 2 w 2 and y is the target vector containing a value for each row of x, w is the weight vector, lambda is a scalar value.
I have tried this, but I'm sure it's not correct:
N = size(x, 2);
Sigma = cov(x);
H = 2.0*Sigma;
c = zeros(N,1);
quadprog(H, c)
Could someone please guide me with what the parameters should be for the quadprog function?