library(MASS)

ps.options(horizontal=FALSE,onefile=FALSE)
ps.options(pagecentre=TRUE)
ps.options(paper="letter")
ps.options(width=7.0,height=7.0)

lim <- 5 
z <- seq(-lim,lim,lim/100)

s <- z

#for (i in z) {s[i] <- z[i]/(1+z[i]*z[i])}

#for (i in z) {s[i] <- atan(z[i])}

#for (i in z) {s[i] <- exp(z[i])/(1+exp(z[i]))}

for (i in z) { s[i] <- tanh(z[i]/4) }

#s <- atanh(s)
  
filename <- "ztran.eps"

postscript(file=filename)

plot(z,s,type="n",ylab="s",xlab="z")
  lines(z,s,lty="solid")

dev.off
