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

hold on; grid on;
% subplot(2,2,3) %C
fX4 = -1:0.05:2;
MaxRat = 200; ITD = 0.3;
fY4GAUSS = MaxRat* exp(-4*(fX4 - ITD).*(fX4 - ITD));
fYSIN = MaxRat*(0.5 + 0.5 * cos(0.5*2*pi*(fX4 - ITD)));
fYDIFF = (-1)*(fY4GAUSS - fYSIN);
% fYC2 = 2.5.*(fXC-1).^2 + 1;
plot(fX4, fY4GAUSS, 'r', fX4, fYSIN, 'g', fX4, fYDIFF, 'b');
grid on %grid minor
xlabel('ITD [ms]');
ylabel('Firing rate [AP/ s]');
axis([-0.5 1.7 -25 225])

% axis([10^1 2*10^5 0 0.1])
print('-deps2', 'FM4V1.eps')
unix('eps2pdfpm FM4V1')