source('iterate_logistic.R') # Part (a): Generate solutions with the requested values for rho: # N = 30 u0 = 0.2 rhos = c( 3.4, 3.5 ) for( ri in 1:length(rhos) ){ rho = rhos[ri] u = iterate_logistic(rho, u0, N) if( ri==1 ){ sols = u }else{ sols = rbind( sols, u ) } } rownames(sols) = c('sol1', 'sol2') #postscript("../../WriteUp/Graphics/Chapter2/chap_2_sect_9_prob_18_plot.eps", onefile=FALSE, horizontal=FALSE) matplot(0:(N-1), t(sols), type='b', lty=1:2, pch=19, xlab='iterate', ylab='u_n') grid() #dev.off()