Hi Ibrahim,
I understand that you have written a script for computing the Feigenbaum Delta from Logistic map and are facing some issues. I went through your code and had some observations:
- You are changing the value of the first for-loop iterator ‘doubling’ at line 17. Although this does not affect the number of times the loop executes, this is not recommended as it may cause confusion in the code. You could redesign you script in a way to avoid this.
- In Newton’s method, you are updating the value of ‘m’ outside for-loop 2 at line 36. It should be done inside for-loop 2 after you iterate through the logistic map in for-loop 3.
for iteration_loop2 = 1:50
for iteration_logistic = 1:period
dx = m *(1-x)+m*dx* (1 - 2 * x);
- The reassigning of ‘m0’ and ‘m1’ is done before for-loop 2. It should be done after that, so that their new values could be used in calculation of ‘m’ during the next iteration.
- Apart from that, you could also try different values of ‘x’ in Newton’s method for better results.
I hope this helps.