Le=zeros(401,2);
i=0;
for u=0:0.001:4
i=i+1;
x=0.9;
y=0;
for k=1:200
x=u*x*(1-x); %Logistic
y=y+log(abs(1-2*x));
end
Le(i,1)=u;
Le(i,2)=log(u)+y/200;
end
plot(Le(:,1),Le(:,2));
hold on;
n=0:0.001:4;
plot(n,0,'b');
%title('(a) Lyapunov exponent curves of the logistic map');
xlabel('\mu');
ylabel('Lyapunov指数图');
axis([1.5 4 -5 1]);grid on
得到图像