function [proportion,x_s,t_s] = cellDeathPopulation(Lconc,Rconc,calcium,timePoint)
%Run Duration to determine benchmark of cell death
[~,~,x_s,t_s] = Duration(Lconc,Rconc,24*3600,24*3600,0);

timePoint = timePoint*3600;

%Specify cPARP concentration indicating cell death
%minimum = max(x_s(:,23));
minimum = 5E5;
%Determine cell population
n = 1000;
viability = zeros(n,1);
figure
for i = 1:n
    %Generate random calcium concentration
  %  rndLconc = normrnd(Lconc,Lconc/2);
  %  if rndLconc < 0
  %      rndLconc = 0;
  %  end
  %    rndRconc = normrnd(Rconc,Rconc);
  %  if rndRconc < 0
  %      rndRconc = 0;
  %  end
  %  cal = normrnd(calcium,calcium);
  %  if cal < 0.01
  %      cal = 0.01;
  %  end
    [~,~,x_s,t_s] = Duration (Lconc,Rconc,timePoint,timePoint,calcium);
    cPARP = max(x_s(:,23));
    if cPARP < minimum
        viability(i) = 1;
    else
        viability(i) = 0;
    end
    hold on
    plot(t_s/3600,x_s(:,23))
    box on
    set(gca,'FontSize',12,'fontWeight','bold')
    xlabel('Time (h)')
    ylabel('cPARP (molecules/cell)')
end
total = sum(viability);
proportion = total/n;
        
end
