xn135xn1xn Write a Matlab script file containing a for loop
xn+1=3.5xn(1-xn)
Write a Matlab script file containing a for loop, that calculates the first 50 iterates of the difference equation, starting from X1 = 0.2, then plots these iterates. Your picture should have the order of the iterate (i.e., n) plotted on the horizontal axis and the value of the iterate (i.e., Xn) plotted on the vertical axis. Each point should be marked on your figure with a red circle
Solution
n Xn 1 0.2 2 0.56 3 0.8624 4 0.415332 5 0.84991 6 0.446472 7 0.864971 8 0.408785 9 0.84588 10 0.456285 11 0.868312 12 0.400213 13 0.840149 14 0.470046 15 0.87186 16 0.391022 17 0.833433 18 0.485879 19 0.874302 20 0.384643 21 0.828425 22 0.49748 23 0.874978 24 0.382871 25 0.826983 26 0.500788 27 0.874998 28 0.382818 29 0.826939 30 0.500887 31 0.874997 32 0.38282 33 0.826941 34 0.500884 35 0.874997 36 0.38282 37 0.826941 38 0.500884 39 0.874997 40 0.38282 41 0.826941 42 0.500884 43 0.874997 44 0.38282 45 0.826941 46 0.500884 47 0.874997 48 0.38282 49 0.826941 50 0.500884
