% plot1.m 96/08/26
%
% Program to plot region of integration in xy plane 
% 

    x1=[0 2]';
    y1up=1-x1/2;
    y1down=x1/2-1;
    x2=[-2 0]';
    y2up=1+x2/2;
    y2down=-x2/2-1;
    plot(x1,y1up,'w-');
    hold on;
    plot(x1,y1down,'w-');
    plot(x2,y2up,'w-');
    plot(x2,y2down,'w-');
    axis square
    xmax=3;
    axis([-xmax xmax -xmax xmax]);
    plot([-xmax xmax],[0 0],'w-');
    plot([0 0],[-xmax xmax],'w-');

    text(1,0.7,'A: x+2y=2');
    text(1,-0.7,'B: x-2y=2');
    text(-2.3,-0.7,'C: x+2y=-2');
    text(-2.3,0.7,'D: x-2y=-2');
    text(2.7,-.15,'x');
    text(-.2,2.7,'y');
    text(-.8,.2,'R(xy)');
    hold off;
