function testbursts()

% number of different sound source angles
nangles = 50;
% Different interburst intervals that will be tested
interb = [10:10:100];
soundangle = rand(nangles,1)*pi/3;
% parameters of the cricket, to be tested
cricketparams = [31.482102 	     42.180104 	     8.070847 	     19.941288 	     9.699823 	     2.377668 	     0.009127 	     0.035844];

timeresults = zeros(length(interb),nangles);
distresults = zeros(length(interb),nangles);

for j=1:nangles
    for i=1:length(interb)
        timeresults(i,j) = parambursttimecricket(cricketparams,interb(i),soundangle(j));
    end
end

undermax = (timeresults < 600);
%absolute number of good results
sumundermax = sum(undermax,2);
%percentage of results where the cricket reaches its target:
percentundermax = sumundermax/nangles;

for j=1:nangles
    for i=1:length(interb)
        distresults(i,j) = paramburstdistcricket(cricketparams,interb(i),soundangle(j));
    end
end

maxdists = distresults .* (1-undermax);
% average minimal distance when not reaching soundsource
avgmaxdists = sum(maxdists,2) ./ (nangles - sumundermax);

gooddists = distresults .* undermax;
% average minimal distance when reaching the soundsource
avggooddists = sum(gooddists,2) ./ sumundermax;

% Display results
disp(sprintf('\n     %% reaching source \t       avg.bad min.dist. \t      avg.good min.dist. \t  '))
disp(sprintf('------------------------------------------------------------------------------------'))
for i=1:length(interb)
    disp(sprintf('%d\t\t%f\t\t%f\t\t%f',interb(i),percentundermax(i),avgmaxdists(i),avggooddists(i)));
end