Practical unit: Logistic map, Chaos and Bifurcations
1.Step)
Write a function which solves the logistic difference equation and returns the vector x(n).
Use an initial value x0 in [0,1], and a parameter value r in [1,4]
f<-function(r,N,x0)
2.) Investigate the sensitivity of solution on the parameter r (especially using r in [3,4])
3.) Now investigate the solutions dependent on r systematically:
4.) write a function which saves the local extrema of a vector (fixed points) and
returns them in a vector.
For each value of r, iterate the logistic difference equation 500 times, discard the first 200 times, and plot the fix-points / local extrema against r
What do you see ?
Zoom into the plot !
Special R-commands needed:
points(x,y) #plots the points x,y x,y can be vectors
before using points() you need to have a plot window open which defines the axes. Therefore call the plot command with ”n” which creates an empty plot.
e.g. plot(xlim=c(0,1),ylim=c(0,1),”n”) define a 0,1 x 0,1 area
1.Step)
Write a function which solves the logistic difference equation and returns the vector x(n).
Use an initial value x0 in [0,1], and a parameter value r in [1,4]
f<-function(r,N,x0)
2.) Investigate the sensitivity of solution on the parameter r (especially using r in [3,4])
3.) Now investigate the solutions dependent on r systematically:
4.) write a function which saves the local extrema of a vector (fixed points) and
returns them in a vector.
For each value of r, iterate the logistic difference equation 500 times, discard the first 200 times, and plot the fix-points / local extrema against r
What do you see ?
Zoom into the plot !
Special R-commands needed:
points(x,y) #plots the points x,y x,y can be vectors
before using points() you need to have a plot window open which defines the axes. Therefore call the plot command with ”n” which creates an empty plot.
e.g. plot(xlim=c(0,1),ylim=c(0,1),”n”) define a 0,1 x 0,1 area