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

%subplot(2,2,4)%D1234567890
% fXD=logspace(1.2,4.2,1000);
% fYD = fXD + 10;
% fYD2 = 0.00001*(fXD - 1000).*(fXD - 1000) + 8;
% hold all; % hold on;

fXD = logspace(1.2,4.2,1000);
fXD10 = logspace(2,3.5,10);
fYD2 = 0.00001*(fXD - 1000).*(fXD - 1000)+6; % + 8; =quadratic fit
  fYD3 = 10^(-8)*fYD2.*fXD + 0.05*log(fXD) + 0.2; % +0.2+0.05*log(fXD)
  fYD4 = [125, 55; 250, 30; 500, 16; 1000, 11; 1250, 24];
% semilogx(fXD, fYD2, 'k',140, 13.333,'o');
semilogx(fXD, fYD2+7.33, 'r-',[140 1000], 13.333*ones(1,2),'bo'); %'r'/k
hold on
semilogx(fXD10, .00005*(fXD10 - 1000).*(fXD10 - 1000)+ 15, 'g-','LineWidth',2) %, 'go'/k)
semilogx(fYD4(:,1),fYD4(:,2),'bs-'); %'b'/k
grid on
xlabel('Sound Frequency [Hz]');
ylabel('ITD [{\mu}s]');
% axis([10^1 2*10^3 0 30])
axis([20^1 10^4 0 60])
print('-deps2', 'FM2V1.eps')
% unix('eps2pdfpm FM2V1')
