x0 = [-1,1];            % Starting guess 
options = optimset('LargeScale','off');
options = optimset(options,'GradObj','on','GradConstr','on');
lb = [ ]; ub = [ ];   % No upper or lower bounds
[x,fval] = fmincon(@objfungrad3,x0,[],[],[],[],lb,ub,... 
   @confungrad3,options)
[c,ceq] = confungrad3(x) % Check the constraint values at x
