Data for Chaos

In this lab we will use be collecting data from a nonlinear difference equation to understand chaos.ccollins@math.utk.eduNonlinear Difference EquationSolvex(n+1) = a x(n) (1-x(n))for various values ofaandx(0)Write a MATLAB script (or function) which lets the user inputaandx(0), computesx(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 ofa(between 0 and 4) and for each value ofause 5 different starting valuesx(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.eduSample 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