Question: Code in R Solution of the difference equation x n = r x n - 1 ( 1 - x n - 1 ) ,

Code in R
Solution of the difference equation xn=rxn-1(1-xn-1), with starting value x 1.(a) Write a function
quadmap( start, rho, niter ) which returns the vector (x1,dots,xn) where xk=rxk-1(1-xk-1) and niter
denotes n , start denotes x 1, and rho denotes r .
Try out the function you have written: for r=2 and xn0.5n0 you should get xn0.5asn.
Try tmp- quadmap(start=0.95, rho=2.99, niter=500) Now type this into the Console: plot(tmp,
type="l") Also try plot(tmp[300:500], type="l")
Code in R Solution of the difference equation x n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!