source ( 'utils.R') #postscript("../../WriteUp/Graphics/Chapter6/chap_6_sect_3_prob_1_4_plots.eps", onefile=FALSE, horizontal=FALSE) par(mfrow=c(2,2)) # Problem 1: # t = seq( 0, +6, length.out=1000 ) g = u_sub_c( t, 1 ) + 2 * u_sub_c( t, 3 ) - 6 * u_sub_c( t, 4 ) plot( t, g, type='p', cex=0.25, pch=20, col='black' ) points( c(1, 3, 4), c(1, 3, -3), pch=20, col='black', cex=1.5 ) grid() # Problem 2: # t = seq( 0, +6, length.out=1000 ) g = (t-3) * u_sub_c( t, 2 ) - (t-2) * u_sub_c( t, 3 ) plot( t, g, type='p', cex=0.25, pch=20, col='black' ) points( c(2, 3), c(-1, -1), pch=20, col='black', cex=1.5 ) grid() # Problem 3: # t = seq( 0, +6, length.out=1000 ) g = (t-pi)^2 * u_sub_c( t, pi ) plot( t, g, type='p', cex=0.25, pch=20, col='black' ) points( c(pi), c(0), pch=20, col='black', cex=1.5 ) grid() # Problem 4: # t = seq( 2, +12, length.out=1000 ) g = sin(t-3) * u_sub_c( t, 3 ) plot( t, g, type='p', cex=0.25, pch=20, col='black' ) points( c(3), c(0), pch=20, col='black', cex=1.5 ) grid() par(mfrow=c(1,1)) #dev.off()