function matedp=matingprob(females,males,b,T,matingseasonlength,noplot)
% b corresponds to Berec's beta
t0=0;
pop0=[females; males; 0];
[t,pop]=ode23(@beach,[t0 matingseasonlength],pop0,[],b,T);
if ~noplot figure(1), plot(t,pop(:,1),'r',t,pop(:,2),'g',t,pop(:,3),'b'), xlabel('Time'), ylabel('Number of individuals'); 

end
matedp=1-(pop(end,1)/pop(1,1));