#
# Homogeneously mixing SIR code
#
#
# Computes successive thresholds
#
thres=function(n)
{
thres=rep(0,(n-1))
thres[1]=rexp(1,(n-1)/n)
for(i in 2:(n-1)) thres[i]=thres[i-1]+rexp(1,(n-i)/n)
thres
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.