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

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

// * * * exemplo 2 - Smith(tese) pag.263 * * *
// 0 <= x <= 1
gf_nlp = 10*(x(1)-0.5);
gg_nlp(1,1) = -exp(x(1)-0.2);
gg_nlp(2,1) = 1;

if nargout > 2 | size(x,2) > 1
  C = [-0.7];
  B = [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';

endfunction
