function [g,jac,flag] = evalgjac(n,x,m)

% [g,jac,flag] = evalgjac(n,x,m)

  flag = 0;
  
  g(1) = 0;
  g(2) = 1;

  jac = spalloc(m,n,4);
  
  jac(1,1) = 2 * x(1);
  jac(1,n) = - 1;

  jac(2,1) = - 1;
  jac(2,n) = - 1;

end
