function [p, fval] = solve_matlab_style(x, y)
H=2*[sum(square(x)), sum(x); sum(x), size(x,1)];
f=[-2*sum(x.*y); -2*sum(y)];
A=[];
b=[];
[p, fval]=quadprog(H,f,A,b);
display(p);
display(fval);
end
