Par5 <- c(2.25, -0.38, -0.29, -0.16)
xx2 <- seq(-2.25, 2.25, by=0.001)
h1 <- DETE(P=Par5, x=xx2)
h2 <- -DETE(P=Par5, x=xx2)
ind <- which(is.na(h1) | is.na(h2))
xx2 <- xx2[-ind]
h1 <- h1[-ind]
h2 <- h2[-ind]
dev.new()
plot(xx2, h1, type="l", col=4, cex.lab=1.5, cex.axis=1.5,
xlim=c(-2.25, 2.25), ylim=c(-30, 30), xlab=expression(italic(x)),
ylab=expression(paste(italic(h), "(", italic(x), ")", sep="")))
lines(xx2, h2, col=2)
graphics.off()
Run the code above in your browser using DataLab