
allMre0 = [];
for i = 1:20
   allMre0 = [allMre0,mre0(i,:)]; 
end

allMreGac2 = [];
for i = 1:20
   allMreGac2 = [allMreGac2,mreGac2(i,:)]; 
end

allMre1 = [];
for i = 1:20
   allMre1 = [allMre1,mre1(i,:)]; 
end

allMre3 = [];
for i = 1:20
   allMre3 = [allMre3,mre3(i,:)]; 
end

allMre5 = [];
for i = 1:20
   allMre5 = [allMre5,mre5(i,:)]; 
end

allMre7 = [];
for i = 1:20
   allMre7 = [allMre7,mre7(i,:)]; 
end

allMre9 = [];
for i = 1:20
   allMre9 = [allMre9,mre9(i,:)]; 
end

allMrex = [];
for i = 1:20
   allMrex = [allMrex,mrex(i,:)]; 
end
% 
% figure;
% hold all;
% h=gca;
% set(h,'FontSize',20);
% set(h,'FontName','Times New Roman');

 
% % get tick label
% yTempTickLabel = sort(log(allMreGac2));
% yTempTickLabel = exp(yTempTickLabel);
% yTickLabelStr = num2str(yTempTickLabel(1), '%10.3f');
% % convert tick labels to string
% for i = 2:tempSize
%     yTickLabelStr = [yTickLabelStr '|' num2str(yTempTickLabel(i), '%10.3f')];
% end
% 
% set(gca,'YTickLabel',yTickLabelStr);


% plot(1:tempSize,sort(log(allMreGac2)),'LineWidth',1.8);
% plot(1:tempSize,sort(log(allMre1)),'LineWidth',1.8);
% plot(1:tempSize,sort(log(allMre2)),'LineWidth',1.8);
% plot(1:tempSize,sort(log(allMre4)),'LineWidth',1.8);
% plot(1:tempSize,sort(log(allMre8)),'LineWidth',1.8);
% plot(1:tempSize,sort(log(allMre16)),'LineWidth',1.8);
% plot(1:tempSize,sort(log(allMrex)),'LineWidth',1.8);

tempSize = size(allMreGac2,2);
axis([0 tempSize 1e-4 100])
set(gca,'FontSize',32)
set(gca,'FontName','Times New Roman');
semilogy(1:tempSize,sort(allMreGac2),1:tempSize,sort(allMre1),1:tempSize,sort(allMre3),1:tempSize,sort(allMre5),1:tempSize,sort(allMre7),1:tempSize,sort(allMre9),1:tempSize,sort(allMrex),'LineWidth',1.8);
set(gca,'FontName','Times New Roman');
ylabel('MRE','fontsize',32);
h_legend=legend('TEAK','k=1','k=3','k=5','k=7','k=9','k=best K','Location','NorthWest');
set(h_legend,'FontSize',22);
