clear				% Clear previous definitions
figure(1)           % Assign figure number
clf                 % Clear previous figures
hold off            % Start with fresh graph

mytitle = 'Boundary Layer Problem'; 	% Title
xlab = '$x$'; 		                % X-label
ylab = '$y$'; 	                    % Y-label
xx = linspace(0,1,500);
ep = 0.05;
%y1 = (exp(-xx) - exp(-xx/ep))./(exp(-1) - exp(-1/ep));
y2 = exp(1-xx);
y3 = exp(1) - exp(1-xx/ep);
plot(xx,y2,'r-','LineWidth',1.5);  
hold on                           
plot(xx,y3,'b-','LineWidth',1.5);
plot([0.07 0.07],[0 3],'b:','LineWidth',1.5);
plot([0.18 0.18],[0 3],'r:','LineWidth',1.5);
arrow([0.54 2.5],[0.43 2.72],'color','b');  
arrow([0.49 2.0],[0.4 1.82],'color','r');
arrow([0.29 1.1],[0.12 0.8]);
arrow([0.21 0.25],[0.04 0.4],'color','b');
% Adds Gridlines
%h =legend('Exact', 'Outer Approx',...
%    'Inner Approx','Location','southeast');
%set(h,'Interpreter','latex')
text(0.55,2.5,'inner approximation','FontSize',12,'color','b');
text(0.22,0.25,'inner layer','FontSize',12,'color','b');
text(0.3,1.1,'overlap domain','FontSize',12);
text(0.5,2.0,'outer approximation','FontSize',12,'color','r');
text(0.55,0.6,'outer layer','FontSize',12,'color','r');
xlim([0 1]);
ylim([0 3]);
fontlabs = 'Times New Roman';   % Font in labels
xlabel(xlab,'FontSize',14,'FontName',fontlabs,...
    'interpreter','latex');  
ylabel(ylab,'FontSize',14,'FontName',fontlabs,...
    'interpreter','latex');  
title(mytitle,'FontSize',16,'FontName',...
    'Times New Roman','interpreter','latex'); 
set(gca,'FontSize',12);         % Axis tick font size
print -depsc bvpmatch_plot.eps		% Create figure as EPS file

