ImageVerifierCode 换一换
格式:DOCX , 页数:9 ,大小:16.24KB ,
资源ID:5312000      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/5312000.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(绘制Duffing振子的分叉图的程序.docx)为本站会员(b****3)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

绘制Duffing振子的分叉图的程序.docx

1、绘制Duffing振子的分叉图的程序绘制Duffing振子的分叉图的程序这些程序思想有些可能不正确,有问题,自己改进,我不再负责对这些程序解释。因为我都不知道道理在哪里。但是期望您能在程序的提示下,进一步的做改进或者改正,以期获得更为精确的结果。别照搬和迷恋别人的程序!% % % 绘制Duffing振子的庞加莱截面图的程序% % buchang:已知激励下步长数值的大小,% % tend程序仿真达到150个激励周期的总时间,% clear;clc% global m c k1 k3 F0 omega% m=1;c=0.1;k1=0;k3=1;omega=1;F0=12% x0=3;4;% ts

2、tart=0;Tbushu=600;buchang=(2*pi/omega)/Tbushu;tend=(2*pi/omega)*150;% tspan=tstart:buchang:tend;% t,y=ode45(dafin3,tspan,x0);% count=find(t(2*pi/omega*40); % 去掉前40个周期的激励时间以消除瞬态响应的影响% Y=y(count,:);% TData=Y(1:Tbushu,1)-Y(Tbushu+1):Tbushu*2,1);% maxvalue,indices=max(abs(TData)% pointnumber=round(tend-

3、2*pi/omega*40)/buchang/Tbushu)-1;% dis=zeros(pointnumber,1);% velo=zeros(pointnumber,1);% for i=1:pointnumber% dis(i,1)=Y(Tbushu*(i-1)+indices,1);% velo(i,1)=Y(Tbushu*(i-1)+indices,2);% end% figure,plot(dis,velo,b.,markersize,5);% % 绘制Duffing振子的分叉图的程序% clear;clc% global m c k1 k3 F0 omega;% m=1;k1=0

4、;k3=1;omega=1;F0=12;% range=0.01:0.01:1;% YY=;k=0;% for c=range% k=k+1;% y0=3,4;% tspan=0:0.01:200;% t,Y=ode45(dafin3,tspan,y0);% count=find(t100);% Y=Y(count,:);% % 画x的分岔图。% j=1;% n=length(Y(:,1);% for i=2:n-1% if Y(i-1,1)+epsY(i+1,1)+eps %简单的取出局部最大值。% YY(k,j)=Y(i,1); %使最大值计数个数自动增加% j=j+1;% end% en

5、d% if j1% plot(c,YY(k,1:j-1),b.,markersize,5);% end% hold on;% index(k)=j-1;% end% xlabel(c);% ylabel(x max);% title(dafin bifurcation diagram);% % % 绘制分岔图的程序% clear,clc% global m c k1 k3 F0 omega% m=1;c=0.1;k1=0;k3=1;omega=1;F0=12;% ccanshu=0.01:0.01:1;% for k=1:100% c=ccanshu(k)% x0=3;4;% tspan=0:

6、0.01*2*pi:500;% t,y=ode45(dafin3,tspan,x0);% dis=zeros(50,1);% velo=zeros(50,1);% for i=1:50% dis(i,1)=y(100*(i+20),1);% velo(i,1)=y(100*(i+20),2);% end% Dismatrix(k,:)=dis;% end% figure,plot(ccanshu,Dismatrix,b.,markersize,3);% %线性参数k1的变化产生的分岔图% clear;clc% global m c k1 k3 F0 omega% m=1;c=0.1;k3=1;

7、omega=1;F0=12;% kcanshu=0.01:0.01:2;% for k=1:200% k1=kcanshu(k)% x0=3;4;% tspan=0:0.01*2*pi:500;% t,y=ode45(dafin3,tspan,x0);% dis=zeros(50,1);% velo=zeros(50,1);% for i=1:50% dis(i,1)=y(100*(i+20),1);% velo(i,1)=y(100*(i+20),2);% end% Dismatrix(k,:)=dis;% end% plot(kcanshu,Dismatrix,b.,markersize,

8、5);% title(参数变化下的分岔图)% xlabel(线性刚度参数k1的变化)% ylabel(X值)% %非线性参数k3的变化产生的分岔图% clear;clc% global m c k1 k3 F0 omega% m=1;c=0.1;k1=0;omega=1;F0=12;% kcanshu=0.01:0.01:2;% for k=1:200% k3=kcanshu(k)% x0=3;4;% tspan=0:0.01*2*pi:500;% t,y=ode45(dafin3,tspan,x0);% dis=zeros(50,1);% velo=zeros(50,1);% for i=1

9、:50% dis(i,1)=y(100*(i+20),1);% velo(i,1)=y(100*(i+20),2);% end% Dismatrix(k,:)=dis;% end% plot(kcanshu,Dismatrix,b.,markersize,5);% title(参数变化下的分岔图)% xlabel(非线性参数k3的变化)% ylabel(X值)% %激励参数F0变化产生的分岔图% clear;clc% global m c k1 k3 F0 omega% m=1;c=0.1;k1=0;k3=1;omega=1;% F0canshu=0.1:0.1:20;% for k=1:20

10、0% F0=F0canshu(k)% x0=3;4;% tspan=0:0.01*2*pi:500;% t,y=ode45(dafin3,tspan,x0);% dis=zeros(50,1);% velo=zeros(50,1);% for i=1:50% dis(i,1)=y(100*(i+20),1);% velo(i,1)=y(100*(i+20),2);% end% Dismatrix(k,:)=dis;% end% plot(F0canshu,Dismatrix,b.,markersize,5);% title(参数变化下的分岔图)% xlabel(激励参数F0的变化)% ylab

11、el(X值)% % %激励频率omega变化产生的分岔图% clear;clc% global m c k1 k3 F0 omega% m=1;c=0.1;k1=0;k3=1;F0=12;% omegacanshu=0.1:0.1:10;% for k=1:100% omega=omegacanshu(k)% x0=3;4;% tspan=0:0.01*2*pi/omega:500;% t,y=ode45(dafin3,tspan,x0);% dis=zeros(50,1);% velo=zeros(50,1);% for i=1:50% dis(i,1)=y(round(100*omega*

12、(i+20),1);% velo(i,1)=y(round(100*omega*(i+20),2);% end% Dismatrix(k,:)=dis;% end% plot(omegacanshu,Dismatrix,b.,markersize,5);% title(参数变化下的分岔图)% xlabel(激励频率omega的变化)% ylabel(X值)% clear;clc% global m c k1 k3 F0 omega% n=3,rhs_ext_fcn=dafin_ext2,fcn_integrator=ode45,tstart=0,stept=0.5,tend=200,% yst

13、art=3 4 0,ioutp=10,% m=1;c=0.1;k1=0;F0=12;k3=1;% omegacanshu=0.1:0.1:10;% for k=1:100% omega = omegacanshu(1,k),lyapunovzhishu(k,:)=lyapunovfun(n,rhs_ext_fcn,fcn_integrator,tstart,stept,tend,ystart,ioutp)% end% figure,plot(omegacanshu,lyapunovzhishu),% title(Lyapunov 动力学指数);% xlabel(激励频率omega变化); yl

14、abel(Lyapunov 指数);% % % 绘制分岔图的程序% clear;clc% global m c k1 k3 F0 omega% m=1;c=0.1;k1=0;k3=1;omega=1;F0=12;% ccanshu=0.01:0.01:1;% for k=1:100% c=ccanshu(k)% x0=3;4;% tstart=0;Tbushu=100;buchang=(2*pi/omega)/Tbushu;tend=(2*pi/omega)*200;% tspan=tstart:buchang:tend;% t,y=ode45(dafin3,tspan,x0);% count

15、=find(t(2*pi/omega*40); % 去掉前40个周期的激励时间以消除瞬态响应的影响% Y=y(count,:);% TData=Y(1:Tbushu,1)-Y(Tbushu+1):Tbushu*2,1);% if k=1% maxvalue,indices=max(abs(TData);% end% pointnumber=round(tend-2*pi/omega*40)/buchang/Tbushu)-1;% dis=zeros(pointnumber,1);% velo=zeros(pointnumber,1);% for i=1:pointnumber% dis(i,1

16、)=Y(Tbushu*(i-1)+indices,1);% velo(i,1)=Y(Tbushu*(i-1)+indices,2);% end% Dismatrix(k,:)=dis;% end% plot(ccanshu,Dismatrix,b.,markersize,3);% % % 绘制分岔图的程序% clear,clc% global m c k1 k3 F0 omega% m=1;c=0.4;k1=-1;k3=1;F0=3;omega=2;% ccanshu=0.01:0.01:1;% for k=1:100% c=ccanshu(k)% x0=2;0;% tstart=0;Tbus

17、hu=100;buchang=(2*pi/omega)/Tbushu;tend=(2*pi/omega)*200;% tspan=tstart:buchang:tend;% t,y=ode45(dafin3,tspan,x0);% count=find(t(2*pi/omega*40); % 去掉前40个周期的激励时间以消除瞬态响应的影响% Y=y(count,:);% TData=Y(1:Tbushu,1)-Y(Tbushu+1):Tbushu*2,1);% if k=1% maxvalue,indices=max(abs(TData);% end% pointnumber=round(te

18、nd-2*pi/omega*40)/buchang/Tbushu)-1;% dis=zeros(pointnumber,1);% velo=zeros(pointnumber,1);% for i=1:pointnumber% dis(i,1)=Y(Tbushu*(i-1)+indices,1);% velo(i,1)=Y(Tbushu*(i-1)+indices,2);% end% Dismatrix(k,:)=dis;% end% figure,plot(ccanshu,Dismatrix,b.,markersize,3);% set(gca,fontsize,20);% title(随参

19、数变化的分岔图,fontsize,20);% xlabel(随阻尼参数c变化,fontsize,20);% % % 绘制分岔图的程序% clear,clc% global m c k1 k3 F0 omega% m=1;c=0.4;k1=-1;k3=1;F0=3;omega=2;% k1canshu=-1:0.01:0.99;% for k=1:200% k1=k1canshu(k)% x0=2;0;% tstart=0;Tbushu=100;buchang=(2*pi/omega)/Tbushu;tend=(2*pi/omega)*200;% tspan=tstart:buchang:ten

20、d;% t,y=ode45(dafin3,tspan,x0);% count=find(t(2*pi/omega*40); % 去掉前40个周期的激励时间以消除瞬态响应的影响% Y=y(count,:);% TData=Y(1:Tbushu,1)-Y(Tbushu+1):Tbushu*2,1);% if k=1% maxvalue,indices=max(abs(TData);% end% pointnumber=round(tend-2*pi/omega*40)/buchang/Tbushu)-1;% dis=zeros(pointnumber,1);% velo=zeros(pointnu

21、mber,1);% for i=1:pointnumber% dis(i,1)=Y(Tbushu*(i-1)+indices,1);% velo(i,1)=Y(Tbushu*(i-1)+indices,2);% end% Dismatrix(k,:)=dis;% end% figure,plot(k1canshu,Dismatrix,b.,markersize,3);% axis(-1,1,-1,4)% set(gca,fontsize,20);% title(随参数变化的分岔图,fontsize,20);% xlabel(随线性刚度参数k1的变化,fontsize,20);% % % 绘制分

22、岔图的程序% clear,clc% global m c k1 k3 F0 omega% m=1;c=0.4;k1=-1;k3=1;F0=3;omega=2;% k3canshu=0.01:0.01:1;% for k=1:100% k3=k3canshu(k)% x0=2;0;% tstart=0;Tbushu=100;buchang=(2*pi/omega)/Tbushu;tend=(2*pi/omega)*200;% tspan=tstart:buchang:tend;% t,y=ode45(dafin3,tspan,x0);% count=find(t(2*pi/omega*40);

23、% 去掉前40个周期的激励时间以消除瞬态响应的影响% Y=y(count,:);% TData=Y(1:Tbushu,1)-Y(Tbushu+1):Tbushu*2,1);% if k=1% maxvalue,indices=max(abs(TData);% end% pointnumber=round(tend-2*pi/omega*40)/buchang/Tbushu)-1;% dis=zeros(pointnumber,1);% velo=zeros(pointnumber,1);% for i=1:pointnumber% dis(i,1)=Y(Tbushu*(i-1)+indices

24、,1);% velo(i,1)=Y(Tbushu*(i-1)+indices,2);% end% Dismatrix(k,:)=dis;% end% figure,plot(k3canshu,Dismatrix,b.,markersize,3);% set(gca,fontsize,20);% title(随参数变化的分岔图,fontsize,20);% xlabel(随非线性刚度参数k3的变化,fontsize,20);% % % 绘制分岔图的程序% clear,clc% global m c k1 k3 F0 omega% m=1;c=0.4;k1=-1;k3=1;F0=3;omega=2

25、;% F0canshu=0.1:0.1:10;% for k=1:100% F0=F0canshu(k)% x0=2;0;% tstart=0;Tbushu=100;buchang=(2*pi/omega)/Tbushu;tend=(2*pi/omega)*200;% tspan=tstart:buchang:tend;% t,y=ode45(dafin3,tspan,x0);% count=find(t(2*pi/omega*40); % 去掉前40个周期的激励时间以消除瞬态响应的影响% Y=y(count,:);% TData=Y(1:Tbushu,1)-Y(Tbushu+1):Tbush

26、u*2,1);% if k=1% maxvalue,indices=max(abs(TData);% end% pointnumber=round(tend-2*pi/omega*40)/buchang/Tbushu)-1;% dis=zeros(pointnumber,1);% velo=zeros(pointnumber,1);% for i=1:pointnumber% dis(i,1)=Y(Tbushu*(i-1)+indices,1);% velo(i,1)=Y(Tbushu*(i-1)+indices,2);% end% Dismatrix(k,:)=dis;% end% figu

27、re,plot(F0canshu,Dismatrix,b.,markersize,3);% set(gca,fontsize,20);% title(随参数变化的分岔图,fontsize,20);% xlabel(随外界激励幅值F0的变化,fontsize,20);% %激励频率omega变化产生的分岔图clear;clcglobal m c k1 k3 F0 omegam=1;c=0.1;k1=0;k3=1;F0=12;omegacanshu=0.1:0.1:10;for k=1:100 omega=omegacanshu(k) x0=3;4; tstart=0;Tbushu=100;buc

28、hang=(2*pi/omega)/Tbushu;tend=(2*pi/omega)*200; tspan=tstart:buchang:tend; t,y=ode45(dafin3,tspan,x0); count=find(t(2*pi/omega*40); % 去掉前40个周期的激励时间以消除瞬态响应的影响 Y=y(count,:); TData=Y(1:Tbushu,1)-Y(Tbushu+1):Tbushu*2,1); if k=1 maxvalue,indices=max(abs(TData); end pointnumber=round(tend-2*pi/omega*40)/b

29、uchang/Tbushu)-1; dis=zeros(pointnumber,1); velo=zeros(pointnumber,1); for i=1:pointnumber dis(i,1)=Y(Tbushu*(i-1)+indices,1); velo(i,1)=Y(Tbushu*(i-1)+indices,2); end Dismatrix(k,:)=dis;endfigure,plot(omegacanshu,Dismatrix,b.,markersize,3);set(gca,fontsize,20);title(随参数变化的分岔图,fontsize,20);xlabel(随外界激励频率omega的变化,fontsize,20);% % clear,clc% n=3,rhs_ext_fcn=dafin_ext2,fcn_integrator=ode45,tstart=0,stept=0.5,tend=200,% ys

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1