[x1,x2]=meshgrid(0:0.1:4,0:0.2:8);
s=-x1-x2;
g=x1.*x2-4;
[c,h]=contour(x1,x2,s,[-1:-1:-11 -8.5],':');
clabel(c,h,'labelspacing',1024,'rotation',0);
hold on;
[c,h]=contour(x1,x2,g,[0 0],'r');
plot([2 2 0],[0 2 2],'k:',2,2,'o');
plot([0.5 0.5 0],[0 8 8],'k:',0.5,8,'o');
xlabel('x_1');
ylabel('x_2');
axis([0 4 0 8.1]);
text(1,1.5,'g(x)<0');
text(2.5,1.8,'g(x)=0');
text(2.5,4,'g(x)>0');
