In this lab we will use be collecting data from a nonlinear
difference equation to understand chaos.
Nonlinear Difference Equation
Solve x(n+1) = a x(n) (1-x(n)) for various values of a and x(0)
Write a MATLAB script (or function) which lets the user input
a and x(0), computes x(1), ..., x(100) and
then prints out the following values (on one line)
a x(96) x(97) x(98) x(99) x(100)
Run with 10 different values of a (between 0 and 4) and
for each value of a use 5 different starting values x(0),
(between 0 and 1).
Save the 50 lines of output (copy and paste them into a file or mail
message) and mail them to me at
ccollins@math.utk.edu
Sample Script
% script file to simulate the difference equation x(n+1) = a x(n)(1-x(n))
a = input('Enter the value for a:');
x(1) = input('Enter the initial value (x(0)):');
for n = 1:100
x(n+1) = a*x(n)*(1-x(n));
end
plot(x)
disp([a x(96:100)])
% end of script