How Do You Compute Lyapunov Exponents in MATLAB?

  • #1
nlsherrill
323
1

Homework Statement


http://courses.ncsu.edu/py411/lec/001/hw6.pdf

#1 part B specifically.



The Attempt at a Solution


For #1 part B I am confused. I have already done part A with MATLAB, and am having syntax issues with trying to compute the Lyapunov exponent(which is the last part of this code). Heres the code so far:

r_values = (3:0.1:6.5)';
iterations_per_value = 2000;
y = zeros(length(r_values), iterations_per_value);
y0 = 0.1;
y(:,1) = r_values.*y0*(1-y0)^2;
for i = 1:iterations_per_value
y(:,i+1) = r_values.*y(:,i).*(1-y(:,i)).^2;
end
plot(y(:,i), r_values)
grid on;

for i=1:2000
f(2000)=limit(1/2000*sum(ln(diff(r_values.*y0*(1-y0)^2))), 2000, inf);
y(i)=f(i-1);
end
sum(y);

The code is correct except for the last loop.

Here is a link to the equation:

http://hypertextbook.com/chaos/43.shtml

Any help would be greatly appreciated.
 
Last edited by a moderator:

Similar threads

Back
Top