#! /usr/bin/octave -qf % Emacs mode header: -*-Octave-*- source. %

%subplot(2,2,1) %A

% subplot(2,2,2) %B
hold on; grid on;
% subplot(2,2,3) %C
load ("-ascii", "../data/asymp1.txt", "v1","v2")
fXC = 0:0.05:5;
fYC = exp(1.9*(fXC-1.25)) - 0.2;
fXC2 = 0:0.33:5;
fYC2 = 2.5.*(fXC2-1).^2 + 1;
fXC3 = 0:0.1:4.95;
fYC3 = 2.5.*(fXC2-1).^0.5 + 1;;
% semilogy(fXC, fYC, 'k', fXC2, fYC2, 'r-o',fXC2, fYC3,'g')
semilogy(fXC, fYC, 'r', fXC2, fYC2, 'b-o') %,fXC2, fYC3,'b')
% semilogy(fXC3,asymp1(:,2));
semilogy(fXC3,asymp1(:,2),'k');
% grid on
xlabel('Spike timing jitter in ms',"fontsize",14);
ylabel('JND of ITD in us',"fontsize",14);
% ylabel('{JND of ITD in {\mu}s}',"fontsize",14);
axis([0 5 0.01 1000])
%axis([10^1 2*10^5 0 0.1])

print('-deps2', 'FM3V1.eps')
unix('eps2pdfpm FM3V1')