  function [xStar,fStar] = QuadModel(B,v)
% B is an n-by-n symmetric matrix with at least one positive eigenvalue.
% v is a column n-vector.
%
% Let f(x) = x'*B*x - 2*v'x where x is a column n-vector.
%
% Let S be the subspace spanned by the eigenvectors of B associated
%    with its positive eigenvalues.
%
% xStar is the vector in S that minimizes f and f(xStar) = fStar
 
