% Pernille Tønnesen
% 2019 Aug 14

clear

pa = 'C:\MATLAB_pt\SW_AcousticScene\Clickdetection\Data\sw196a\';
load([pa 'sw17_196a_click.mat'])

ICI = [whale.ICIall];

% Histogram plot
figure(88),clf
edges = [0:0.001:1];
h = histogram(ICI,edges);
hold on
plot(0.1535*[1 1],ylim)
xlabel('ICI (s)')
ylabel('Occurrences')
title('All ICI sw17-196a (binwidth = 1ms)')

% Double logarithmic histogram plot
figure(89), clf
edges = [0:0.001:1];
h = histogram(ICI,edges);
hold on
set(gca,'xscale','log')
set(gca,'yscale','log')
xlabel('ICI (s)')
ylabel('Occurrences')
title('All ICI sw17-196a (binwidth = 1ms)')




% Save
pas = 'C:\MATLAB_pt\SW_AcousticScene\Meetings\Aug 16\';
saveas(h,[pas 'Buzz_ici_threshold'])