lorenz混沌系统matlab程序,Lorenz混沌系统相图
生活随笔
收集整理的這篇文章主要介紹了
lorenz混沌系统matlab程序,Lorenz混沌系统相图
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
來源: http://blog.csdn.net/superdont
建立函數1:
function xdot=lorrenz(t,x)
for t=0:0.1:100;
if(cos(5.3*t)>=0)
p=1;
else
p=-1;
end
end
xdot=[-8/3*x(1)+p*x(2)*x(3);(-x(2)+x(3))*(25-10*cos(5.3*t));-p*x(1)*x(2)-(17.5*cos(5.3*t)+10.5)*x(2)+(13.3-14*cos(5.3*t))*x(3)];
建立文件2:
tic;
x0=[0;0;1e-10];tspan=[0,100];
[t,x]=ode45(@lorrenz,tspan,x0);
plot(t,x(:,1),'k');
r=length(t)-5000:length(t);
figure; plot(x(r,2),x(r,3),'k');
toc;
顯示相圖如下
輸出結果:
Elapsed time is 5.547000 seconds.
式中函數:
Tic
Toc
用于計算時間,例如:
for n = 1:100
A = rand(n,n);
b = rand(n,1);
tic
x = A/b;
t(n) = toc;
end
plot(t)
可輸出:
總結
以上是生活随笔為你收集整理的lorenz混沌系统matlab程序,Lorenz混沌系统相图的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IDEA手动下载导入插件
- 下一篇: 墨菲定律、二八法则、马太效应、手表定理、