function [x1,x2,y1,y2,x,fval] = midge();

x1=[1.24,1.36,1.38,1.38,1.38,1.40,1.48,1.54,1.56];
x2=[1.14,1.18,1.20,1.26,1.28,1.30];
y1=[1.72,1.74,1.64,1.82,1.90,1.70,1.82,1.82,2.08];
y2=[1.78,1.96,1.86,2.00,2.00,1.96];

A = [x1' ones(length(x1),1) -eye(length(x1)) zeros(length(x1),length(x2)); 
     x2' ones(length(x2),1)  zeros(length(x2),length(x1)) eye(length(x2))];

b = [y1' ; y2'];

c=zeros(length(x1)+length(x2)+2,1);
lb = c;

[x,fval] = linprog(c,[],[],A,b,lb,[],[],optimset('LargeScale','on'));

plot(x1,y1,'*')
hold on
plot(x2,y2,'x')
t = 1.1:.1:1.6;
z = x(1)*t + x(2);
plot(t,z)
