# 2
#
#
# See the exercise
# http://www.physics.cornell.edu/~myers/teaching/ComputationalMethods/ComputerExercises/InvariantMeasure.html
#
#
"""Invariant Measure exercise"""
#
from IterateLogistic import *
#
def PlotInvariantDensityWithBoundaries(g, x0, num_boundaries,
mu, xMax=0.5):
"""Plots the invariant density, together with the first num_boundaries
iterates of xMax = 0.5 (which should coincide with folds, and hence
cusps, in the invariant density). Plots the iterates f^[n](xMax) as red
circles 'ro' at rho = n."""
pass
#
# Plot bifurcation diagram; explain boundaries as images of x=1/2
# BifurcationDiagram(f, 0.1, 500, 128, scipy.linspace(0.8, 1.0, 200),
# showPlot=False)
# PlotBoundaries(f, 8, scipy.linspace(0.8, 1.0, 200))
#
def PlotBoundaries(g, nImages, muArray, xMax=0.5):
"""
For each parameter value eta in etaArray,
iterate the point xMax nImages times, and plot the result
(not including xMax) versus eta. We recommend using
pylab.plot(etas, halfImages, 'ro')
where the 'ro' will draw red circles.
Usually xMax will be the peak in the function g (as hinted at by
its name).
This can be used in conjunction with BifurcationDiagram to explain
the boundary structure in the chaotic region. If you remove
pylab.show() from BifurcationDiagram, this plot will be
superimposed on the other.
"""
pass
#
# Copyright (C) Cornell University
# All rights reserved.
# Apache License, Version 2.0