繪制Duffing振子地分叉圖地程序_第1頁(yè)
繪制Duffing振子地分叉圖地程序_第2頁(yè)
繪制Duffing振子地分叉圖地程序_第3頁(yè)
繪制Duffing振子地分叉圖地程序_第4頁(yè)
繪制Duffing振子地分叉圖地程序_第5頁(yè)
已閱讀5頁(yè),還剩15頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

實(shí)用標(biāo)準(zhǔn)文案文檔大全這些程序思想有些可能不正確,有問題,自己改進(jìn),我不再負(fù)責(zé)對(duì)這些程序解釋。因?yàn)槲叶疾恢赖览碓谀睦?。但是期望您能在程序的提示下,進(jìn)一步的做改進(jìn)或者改正,以期獲得更為精確的結(jié)果。別照搬和迷戀別人的程序!

%%%%%%繪制Duffing振子的龐加萊截面圖的程序

%%buchang:已知激勵(lì)下步長(zhǎng)數(shù)值的大小,

%%tend程序仿真達(dá)到150個(gè)激勵(lì)周期的總時(shí)間,

%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個(gè)周期的激勵(lì)時(shí)間以消除瞬態(tài)響應(yīng)的影響

%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%簡(jiǎn)單的取出局部最大值。

%YY(k,j)=Y(i,1);%使最大值計(jì)數(shù)個(gè)數(shù)自動(dòng)增加

%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);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%線性參數(shù)k1的變化產(chǎn)生的分岔圖

%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('參數(shù)變化下的分岔圖')

%xlabel('線性剛度參數(shù)k1的變化')

%ylabel('X值')

%%非線性參數(shù)k3的變化產(chǎn)生的分岔圖

%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('參數(shù)變化下的分岔圖')

%xlabel('非線性參數(shù)k3的變化')

%ylabel('X值')

%%激勵(lì)參數(shù)F0變化產(chǎn)生的分岔圖

%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('參數(shù)變化下的分岔圖')

%xlabel('激勵(lì)參數(shù)F0的變化')

%ylabel('X值')

%%%激勵(lì)頻率omega變化產(chǎn)生的分岔圖

%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('參數(shù)變化下的分岔圖')

%xlabel('激勵(lì)頻率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動(dòng)力學(xué)指數(shù)');

%xlabel('激勵(lì)頻率omega變化');ylabel('Lyapunov指數(shù)');

%%%繪制分岔圖的程序

%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個(gè)周期的激勵(lì)時(shí)間以消除瞬態(tài)響應(yīng)的影響

%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個(gè)周期的激勵(lì)時(shí)間以消除瞬態(tài)響應(yīng)的影響

%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('隨參數(shù)變化的分岔圖','fontsize',20);

%xlabel('隨阻尼參數(shù)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個(gè)周期的激勵(lì)時(shí)間以消除瞬態(tài)響應(yīng)的影響

%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('隨參數(shù)變化的分岔圖','fontsize',20);

%xlabel('隨線性剛度參數(shù)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個(gè)周期的激勵(lì)時(shí)間以消除瞬態(tài)響應(yīng)的影響

%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('隨參數(shù)變化的分岔圖','fontsize',20);

%xlabel('隨非線性剛度參數(shù)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個(gè)周期的激勵(lì)時(shí)間以消除瞬態(tài)響應(yīng)的影響

%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('隨參數(shù)變化的分岔圖','fontsize',20);

%xlabel('隨外界激勵(lì)幅值F0的變化','fontsize',20);

%%激勵(lì)頻率omega變化產(chǎn)生的分岔圖

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個(gè)周期的激勵(lì)時(shí)間以消除瞬態(tài)響應(yīng)的影響

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. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論