function grad = gradg(x,H,b,c)
% gradg evaluates the gradient of function g at x given the data.
%
% INPUT: x (Point where function should be evaluated given as a column 
%           vector. x can also be a matrix where each column is a point).
%        H (symmetric positive definite matrix).
%        b (Column vector).
%        c (Column vector).
%        
%
% OUTPUT: grad (Gradient given as a column vector. Can also be a matrix
%               where column i is the gradient of g evaluated at column 
%               i of x).
%

m = size(x,2);
grad = repmat(-b,1,m)+H*x+(1/3)*repmat(c,1,m).*x.^3;

end

