clear

peaktime = load('peaktime_rate.txt');
halfwidth = load('halfwidth_rate.txt');
amplitude = load('amplitude_rate.txt');

magnify = [log10(0.01), log10(0.02), log10(0.05), log10(0.1), log10(0.2), log10(0.5), ...
         log10(1), log10(2), log10(5), log10(10), log10(20), log10(50), log10(100)];


for index =1:4
subplot(4,3,(index-1)*3+1)
errorbar(magnify-0.02,peaktime((index-1)*4+1, :),peaktime((index-1)*4+2,:),'b')
hold on
errorbar(magnify+0.02,peaktime((index-1)*4+3, :),peaktime((index-1)*4+4,:),'r')
axis([-2.2 2.2 -200 300])
set(gca,'xtick',[log10(0.01), log10(0.02), log10(0.05), log10(0.1), log10(0.2), log10(0.5), ...
         log10(1), log10(2), log10(5), log10(10), log10(20), log10(50), log10(100)])
set(gca,'XTickLabel','1/100|1/50|1/20|1/10|1/5|1/2|1|2|5|10|20|50|100')
set(gca,'ytick',[-200 -100 0 100 200 300])
title('Peak time')
xlabel('Parameter magnitude')
ylabel('Time change (%)')


subplot(4,3,(index-1)*3+2)
errorbar(magnify-0.02,halfwidth((index-1)*4+1, :),halfwidth((index-1)*4+2,:),'b')
hold on
errorbar(magnify+0.02,halfwidth((index-1)*4+3, :),halfwidth((index-1)*4+4,:),'r')
axis([-2.2 2.2 -200 300])
set(gca,'xtick',[log10(0.01), log10(0.02), log10(0.05), log10(0.1), log10(0.2), log10(0.5), ...
         log10(1), log10(2), log10(5), log10(10), log10(20), log10(50), log10(100)])
set(gca,'XTickLabel','1/100|1/50|1/20|1/10|1/5|1/2|1|2|5|10|20|50|100')
set(gca,'ytick',[-200 -100 0 100 200 300])
title('Half-width')
xlabel('Parameter magnitude')
ylabel('Time change (%)')


subplot(4,3,(index-1)*3+3)
errorbar(magnify-0.02,amplitude((index-1)*4+1, :),amplitude((index-1)*4+2,:),'b')
hold on
errorbar(magnify+0.02,amplitude((index-1)*4+3, :),amplitude((index-1)*4+4,:),'r')
axis([-2.2 2.2 -200 300])
set(gca,'xtick',[log10(0.01), log10(0.02), log10(0.05), log10(0.1), log10(0.2), log10(0.5), ...
         log10(1), log10(2), log10(5), log10(10), log10(20), log10(50), log10(100)])
set(gca,'XTickLabel','1/100|1/50|1/20|1/10|1/5|1/2|1|2|5|10|20|50|100')
set(gca,'ytick',[-200 -100 0 100 200 300])
title('Peak amplitude')
xlabel('Parameter magnitude')
ylabel('response change (%)')

end




