版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
实用标准文案文档大全这些程序思想有些可能不正确,有问题,自己改进,我不再负责对这些程序解释。因为我都不知道道理在哪里。但是期望您能在程序的提示下,进一步的做改进或者改正,以期获得更为精确的结果。别照搬和迷恋别人的程序!
%%%%%%绘制Duffing振子的庞加莱截面图的程序
%%buchang:已知激励下步长数值的大小,
%%tend程序仿真达到150个激励周期的总时间,
%clear;clc
%globalmck1k3F0omega
%
%m=1;c=0.1;k1=0;k3=1;omega=1;F0=12
%x0=[3;4];
%tstart=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-2*pi/omega*40)/buchang/Tbushu)-1;
%dis=zeros(pointnumber,1);
%velo=zeros(pointnumber,1);
%fori=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
%globalmck1k3F0omega;
%m=1;k1=0;k3=1;omega=1;F0=12;
%range=[0.01:0.01:1];
%YY=[];k=0;
%forc=range
%k=k+1;
%y0=[3,4];
%tspan=[0:0.01:200];
%[t,Y]=ode45('dafin3',tspan,y0);
%count=find(t>100);
%Y=Y(count,:);
%%画x的分岔图。
%j=1;
%n=length(Y(:,1));
%fori=2:n-1
%ifY(i-1,1)+eps<Y(i,1)&Y(i,1)>Y(i+1,1)+eps%简单的取出局部最大值。
%YY(k,j)=Y(i,1);%使最大值计数个数自动增加
%j=j+1;
%end
%end
%ifj>1
%plot(c,YY(k,[1:j-1]),'b.','markersize',5);
%end
%holdon;
%index(k)=j-1;
%end
%xlabel('c');
%ylabel('xmax');
%title('dafinbifurcationdiagram');
%%%绘制分岔图的程序
%clear,clc
%globalmck1k3F0omega
%
%m=1;c=0.1;k1=0;k3=1;omega=1;F0=12;
%ccanshu=0.01:0.01:1;
%fork=1:100
%c=ccanshu(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);
%fori=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
%globalmck1k3F0omega
%m=1;c=0.1;k3=1;omega=1;F0=12;
%kcanshu=0.01:0.01:2;
%fork=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);
%fori=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',5);
%title('参数变化下的分岔图')
%xlabel('线性刚度参数k1的变化')
%ylabel('X值')
%%非线性参数k3的变化产生的分岔图
%clear;clc
%globalmck1k3F0omega
%m=1;c=0.1;k1=0;omega=1;F0=12;
%kcanshu=0.01:0.01:2;
%fork=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);
%fori=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',5);
%title('参数变化下的分岔图')
%xlabel('非线性参数k3的变化')
%ylabel('X值')
%%激励参数F0变化产生的分岔图
%clear;clc
%globalmck1k3F0omega
%m=1;c=0.1;k1=0;k3=1;omega=1;
%F0canshu=0.1:0.1:20;
%fork=1:200
%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);
%fori=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的变化')
%ylabel('X值')
%%%激励频率omega变化产生的分岔图
%clear;clc
%globalmck1k3F0omega
%m=1;c=0.1;k1=0;k3=1;F0=12;
%omegacanshu=0.1:0.1:10;
%fork=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);
%fori=1:50
%dis(i,1)=y(round(100*omega*(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
%globalmck1k3F0omega
%n=3,rhs_ext_fcn=@dafin_ext2,fcn_integrator=@ode45,tstart=0,stept=0.5,tend=200,
%ystart=[340],ioutp=10,
%m=1;c=0.1;k1=0;F0=12;k3=1;
%omegacanshu=0.1:0.1:10;
%fork=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变化');ylabel('Lyapunov指数');
%%%绘制分岔图的程序
%clear;clc
%globalmck1k3F0omega
%
%m=1;c=0.1;k1=0;k3=1;omega=1;F0=12;
%ccanshu=0.01:0.01:1;
%fork=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=find(t>(2*pi/omega*40));%去掉前40个周期的激励时间以消除瞬态响应的影响
%Y=y(count,:);
%TData=Y(1:Tbushu,1)-Y((Tbushu+1):Tbushu*2,1);
%ifk==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);
%fori=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
%plot(ccanshu,Dismatrix,'b.','markersize',3);
%%%绘制分岔图的程序
%clear,clc
%globalmck1k3F0omega
%m=1;c=0.4;k1=-1;k3=1;F0=3;omega=2;
%ccanshu=0.01:0.01:1;
%fork=1:100
%c=ccanshu(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):Tbushu*2,1);
%ifk==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);
%fori=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('随参数变化的分岔图','fontsize',20);
%xlabel('随阻尼参数c变化','fontsize',20);
%%%绘制分岔图的程序
%clear,clc
%globalmck1k3F0omega
%m=1;c=0.4;k1=-1;k3=1;F0=3;omega=2;
%k1canshu=-1:0.01:0.99;
%fork=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: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);
%ifk==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);
%fori=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);
%%%绘制分岔图的程序
%clear,clc
%globalmck1k3F0omega
%m=1;c=0.4;k1=-1;k3=1;F0=3;omega=2;
%k3canshu=0.01:0.01:1;
%fork=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));%去掉前40个周期的激励时间以消除瞬态响应的影响
%Y=y(count,:);
%TData=Y(1:Tbushu,1)-Y((Tbushu+1):Tbushu*2,1);
%ifk==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);
%fori=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(k3canshu,Dismatrix,'b.','markersize',3);
%set(gca,'fontsize',20);
%title('随参数变化的分岔图','fontsize',20);
%xlabel('随非线性刚度参数k3的变化','fontsize',20);
%%%绘制分岔图的程序
%clear,clc
%globalmck1k3F0omega
%m=1;c=0.4;k1=-1;k3=1;F0=3;omega=2;
%F0canshu=0.1:0.1:10;
%fork=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):Tbushu*2,1);
%ifk==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);
%fori=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(F0canshu,Dismatrix,'b.','markersize',3);
%set(gca,'fontsize',20);
%title('随参数变化的分岔图','fontsize',20);
%xlabel('随外界激励幅值F0的变化','fontsize',20);
%%激励频率omega变化产生的分岔图
clear;clc
globalmck1k3F0omega
m=1;c=0.1;k1=0;k3=1;F0=12;
omegacanshu=0.1:0.1:10;
fork=1:100
omega=omegacanshu(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=find(t>(2*pi/omega*40));%去掉前40个周期的激励时间以消除瞬态响应的影响
Y=y(count,:);
TData=Y(1:Tbushu,1)-Y((Tbushu+1):Tbushu*2,1);
ifk==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);
fori=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(omegacanshu,Dismatrix
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 牛顿环干涉现象
- 中学安全教育教案
- 交通安全教育讲话稿
- 53模拟试卷初中地理八年级下册02中考地理真题分项精练(二)地球的表层
- 2022年大学生总结例文三篇
- 电大专科【西方经济学】期末试题题库及答案(试卷号:2143)
- 七年级生物上册 1.2.2 生物与环境组成生态系统教案1 (新版)新人教版
- 六年级品德与社会下册 第三单元 同在一片蓝天下 2 放飞和平鸽教案3 新人教版
- 英语周报2024学年高中英语 Unit2 Getting a job Welcome to the unit教案 牛津译林版选修11
- 九年级道德与法治上册 第二单元 感受祖国的心跳 第六课 手足情深 第1框 五十六个民族是一家教案 人民版
- 部编版语文八年级下册第一单元《民风民俗》作业设计
- 2024新人教版初中七年级道德与法治上册第一单元:少年有梦大单元整体教学设计
- pep人教版小升初一般现在时练习
- 第一章 机械运动 单元测试- 2024-2025学年人教版八年级上册物理
- 河南省科学技术馆招聘工作人员真题
- 中东及非洲SUS-Al合金复合金属行业现状及发展机遇分析2024-2030
- 工程造价咨询管理制度(共5篇)
- 智联招聘国企笔试题库
- 22《四季之美》第二课时(教学设计)语文五年级上册
- 人教版六年级上册 《工程问题》说课稿及反思
- 教学评一体化视域下的中职英语听说活动设计-以《英语1基础模块》Unit3-Shopping为例
评论
0/150
提交评论