#postscript("../../WriteUp/Graphics/Chapter2/chap_2_sect_1_prob_27_plot.eps", onefile=FALSE, horizontal=FALSE) ts = seq( 0, 4, length.out=500 ) ys = (4/5) * ( 2*sin(ts) + cos(ts) ) - (9/5)*exp(-ts/2) plot( ts, ys, type='l', xlab='t', ylab='y(t)' ) grid() mi = which.max(ys) print( c( ts[mi], ys[mi] ) ) #dev.off()