% P4
% Checks out QuadForm

% Generate a random n-by-n symmetric matrix...
n = 10;
randn('seed',0)
A = randn(n,n); A = (A + A')/2;

[xMax,phiMax] = QuadForm(A);

clc
format long
xMax = xMax
sumxMax = sum(xMax)
phiMax = phiMax