%ENCE 360, MATLAB code to generate feasible region to the
%integer-constrained toy problem from the IP lecture
counter =0
for i=0:100
    for j=0:100
        x=[i;j];
        if ((2*x(1)+x(2)<=99.7) & (x(1)+x(2)<=83.5) & (x(1)<=40))
          counter = counter +1
          x1x2(counter,1)= i;
          x1x2(counter,2)=j;
      end
  end
end
plot (x1,x2,'b.:') % plots in MATLAB
AXIS([0 90 0 90])  % AXIS([XMIN XMAX YMIN YMAX])
csvwrite('x1x2.csv',x1x2)  % writes out to a comma separated value file .csv) used by Excel