function fig3_4B

A=zeros(2,2);
A(1,1)=1;
A(1,2)=-1;
A(2,1)=-1;
A(2,2)=2;
k_inf=cond(A,inf)
k_2=cond(A,2)

clf
% get(gcf)
set(gcf,'Position', [26 909 867 436])
co = [0 0 1;
    0 0.5 0;
    1 0 0;
    0 0.75 0.75;
    0.75 0 0.75;
    0.75 0.75 0;
    0.25 0.25 0.25];
set(groot,'defaultAxesColorOrder',co)

nt=200;
th=linspace(0,2*pi,nt);
for it=1:nt
    x0(it)=cos(th(it));
    y0(it)=sin(th(it));
end

% left ellipse
subaxis(1,3,1,1,'MT',0.01,'MB',0.13,'MR',0.02,'ML',0.05,'P',0.02)

A(2,2)=1.5;
AA=inv(A);
k_inf=cond(A,inf)
k_2=cond(A,2)
for it=1:nt
    x1(it)=AA(1,1)*x0(it)+AA(1,2)*y0(it);
    y1(it)=AA(2,1)*x0(it)+AA(2,2)*y0(it);
end
hold on
plot(x1,y1,'b','LineWidth',1.8)
axis equal
box on
grid on
xlabel('x_1-axis')
ylabel('x_2-axis')
xM=round(norm(x1,inf)-0.5)
yM=round(norm(y1,inf)+0.5)
set(gca,'ytick',[-yM 0 yM])
set(gca,'xtick',[-xM 0 xM])
set(gca,'XTickLabel',{'-3r';'0';'3r'})
set(gca,'YTickLabel',{'-3r';'0';'3r'})
xs=xlim;
plot([xs(1) xs(2)],[0 0],'k','LineWidth',0.3)
ys=ylim;
plot([0 0],[ys(1) ys(2)],'k','LineWidth',0.3)
set(gca,'FontSize',22)
say2=['\kappa_\infty = 12'];
say=['d = 1.5'];
yy=ylim;
xA=xM/12;  yA=yy(1)*0.8;
text(xA,yA,say2,'FontSize',20,'FontWeight','bold')
text(xA,yA*0.8,say,'FontSize',20,'FontWeight','bold')
set(gca,'FontSize',19,'FontWeight','bold')

%exportgraphics(gca,'/Users/mark/Desktop/n1.eps')

% middle ellipse
subaxis(1,3,2,1)
A(2,2)=1.1;
AA=inv(A);
k_inf=cond(A,inf)
k_2=cond(A,2)
for it=1:nt
    x1(it)=AA(1,1)*x0(it)+AA(1,2)*y0(it);
    y1(it)=AA(2,1)*x0(it)+AA(2,2)*y0(it);
end
hold on
plot(x1,y1,'b','LineWidth',1.8)
axis equal
xM=round(norm(x1,inf)-0.5);
yM=round(norm(y1,inf)+0.5);
set(gca,'ytick',[-yM 0 yM])
set(gca,'XTickLabel',{'-15r';'0';'15r'})
set(gca,'YTickLabel',{'-15r';'0';'15r'})
xlim([-15 15])
xs=xlim;
plot([xs(1) xs(2)],[0 0],'k','LineWidth',0.3)
ys=ylim;
plot([0 0],[ys(1) ys(2)],'k','LineWidth',0.3)
set(gca,'xtick',[-15 0 15])
box on
grid on
xlabel('x_1-axis')
set(gca,'FontSize',22)
say2=['\kappa_\infty = 44'];
say=['d = 1.1'];
yy=ylim;
xA=xM/12;  yA=yy(1)*0.8;
text(xA,yA,say2,'FontSize',20,'FontWeight','bold')
text(xA,yA*0.8,say,'FontSize',20,'FontWeight','bold')
set(gca,'FontSize',19,'FontWeight','bold')

%exportgraphics(gca,'/Users/mark/Desktop/n2.eps')

% right ellipse
subaxis(1,3,3,1)
A(2,2)=1+1/20;
AA=inv(A);
k_inf=cond(A,inf)
k_2=cond(A,2)
for it=1:nt
    x1(it)=AA(1,1)*x0(it)+AA(1,2)*y0(it);
    y1(it)=AA(2,1)*x0(it)+AA(2,2)*y0(it);
end
hold on
plot(x1,y1,'b','LineWidth',1.8)
axis equal
box on
grid on
xlabel('x_1-axis')
xM=round(norm(x1,inf)-0.5);
yM=round(norm(y1,inf)+0.5);
set(gca,'XTickLabel',{'-30r';'0';'30r'})
set(gca,'YTickLabel',{'-30r';'0';'30r'})
xs=xlim;
plot([xs(1) xs(2)],[0 0],'k','LineWidth',0.3)
ys=ylim;
plot([0 0],[ys(1) ys(2)],'k','LineWidth',0.3)
set(gca,'ytick',[-30 0 30])
xlim([-30 30])
set(gca,'xtick',[-30 0 30])
say2=['\kappa_\infty = 82'];
say=['d = 1.05'];
yy=ylim;
xA=xM/12;  yA=yy(1)*0.8;
text(xA,yA,say2,'FontSize',20,'FontWeight','bold')
text(xA,yA*0.8,say,'FontSize',20,'FontWeight','bold')
set(gca,'FontSize',19,'FontWeight','bold')

%exportgraphics(gcf,'/Users/mark/Desktop/nn.eps')
%exportgraphics(gcf,'/Users/holmes/Desktop/nn.eps')




























