function grad = quadgrad(x)
% usage: grad = quadgrad(x)
% description: Returns the gradient vector for quadratic test 
% function of the form Q(x) = 0.5*x'*A*x - b*x
% where A is symmetric, A and b are globals defined
% outside this function.  This is really a placeholder
% for linear system solving.

global quadA;
global quadb;

grad = quadA*x - quadb;