function retval = quadfn(x) % usage: y = quadfn(x) % description: Returns value of 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; % no bulletproofing retval = 0.5*x'*quadA*x - quadb'*x;