i need to draw bifurcation and lyapunav for duffing oscillator can anyone help to solve

20 ビュー (過去 30 日間)
chithra A
chithra A 2014 年 8 月 4 日
function duffing_oscillator clear all
amp=0.40; % control parameter
alpha=0.5;
beta=-1.0;
gamma=1;
w=1;
tspan = 0:0.1:800; %time step and initial condition
x10 = 0.5021; x20 = 0.17606;
y0 = [x10; x20];
[~,y] = ode45(@(t,x) f(t,x,alpha,beta,gamma,amp,w),tspan,y0);
x1=y(:,1); x2=y(:,2);
plot(x1,x2); %plot the variable x and y
xlabel ('x1');
ylabel ('x2');
title('phase portrait of duffing oscillator');
function dy = f(t,y,alpha,beta,gamma,amp,w)
x1 = y(1); x2 = y(2);
dx1=x2;
dx2=-alpha*x2-beta*x1-gamma*x1^3+amp*sin(w*t);
dy = [dx1; dx2];

回答 (0 件)

カテゴリ

Help Center および File ExchangeNonlinear Analysis についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by