slope<- -0.5683 intercept<-21.84 x<-seq(1,50,0.05) mat.vec<-1/(1+exp(slope*(x-intercept))) mat.vec[mat.vec>0.95] width.95per<-(x[mat.vec>0.95]-intercept)[1] width.95per