#postscript("../../WriteUp/Graphics/Chapter1/chap_1_sect_2_prob_11_plot.eps", onefile=FALSE, horizontal=FALSE) ts = seq( 0, 20, length.out=200 ) y_1 = 49 * ( 1 - exp(-ts/5) ) y_2 = 49*tanh(ts/5) plot( ts, y_1, type='l', col='blue', xlab='time', ylab='v(t)' ) lines( ts, y_2, type='l', col='red' ) grid() legend('topleft', legend=c('exponential', 'tanh'), col=c('blue', 'red'), lty=c(1, 1)) #dev.off()