function [gf_nlp,gg_nlp,C,B] = grad (x,y)

if size(x,2) > 1
  y = x(2:4);         % NLP com integralidade relaxada
end

% * * *  exemplo 6 - Floudas pag 133 * * *
gf_nlp(1) = 10*x(1);
gg_nlp(1,1) = 3;
gg_nlp(2,1) = -1;
gg_nlp(3,1) = 0;
gg_nlp(4,1) = 0;

if nargout > 2 | size(x,2) > 1
  C = [1, 1, 1];  
  B = [-1, -1, 0; 0, 0.1, 0.25; -1, -1, -1; -1 -1 -2];
end

if size(x,2) > 1         % NLP com integralidade relaxada
  gf_nlp = [gf_nlp C];
  gg_nlp = [gg_nlp B];
end
gg_nlp=gg_nlp';

