x(n) is the number of animals in generation n
then under a couple of assumptions
the number of animals in generation n+1 is x(n+1)=r*x(n)*(1-x(n))
where r is the reproduction rate. As r varies between
0 and 4 the behavior of this equation varys from stable (settles down to one
value) to chaotic (never repeats itself). The following Matlab program implements
a simulation of this equation.%logistic.m - this MATLAB file solves the %discrete logistic equation x(i+1)=r*x(i)*(1-x(i)) clear all r=3.7; %the rate parameter range 0-4 n=4000; %the number of point to generate x(1)=0.55; %initial value for x for i=1:n-1 x(i+1)=r*x(i)*(1-x(i)); end sound(x,4000); clf %plot a chunk in the middle of the waveform plot(1000:1100,x(1000:1100));
Modify the program so that it automatically steps through a range of values
of r. Start with the range 2.9 to 4 in steps of 0.1. Design the
program so that is will be easy to change the beginning, end and step size.
At each step, the modified program should play the sound and make a plot.
Write out the modified program, but actually test it during lab.