Problem with neutral type delayed differential equation

Hi!
I am trying to solve a neutral type differential equation with the DDENSD function, however it does not seem to work properly for me. I get results, but no matter how I change the coefficients of the delayed term, the results does not change at all. I attached my code:
function sol = Simulation(Tend)
sol = ddensd(@ddefun,@dely,@delyp,@history,[0.11 Tend]);
figure(1)
plot(sol.y(1,:),sol.y(3,:));
xlabel('u1(t) [m]','fontsize',40);
ylabel('u2(t) [m/s]','fontsize',40);
set(gca,'FontSize',30);
figure(2)
plot(sol.x,sol.y(1,:))
xlabel('t [s]','fontsize',40);
ylabel('u(t) [m]','fontsize',40);
set(gca,'FontSize',30);
figure(3)
plot(sol.x,sol.y(3,:))
xlabel('t [s]','fontsize',40);
ylabel('du(t) [m/s]','fontsize',40);
set(gca,'FontSize',30);
end
%-----------------------------------------------------------------------
function yp = ddefun(t,y,ydel,ypdel)
omega1=2*pi;omega2=2*pi;xi=0.1;r=1;mu=1000000;K=0.01;
yp = [y(2)
-2*xi*r*omega2*(y(2)-y(4))-omega2^2*r*(y(1)-y(3))-mu*r*(y(1)-y(3))^3-omega1^2*y(1)+K*omega1^2*ypdel(4)
y(4)
-2*xi*omega2*(y(4)-y(2))-omega2^2*(y(3)-y(1))-mu*(y(3)-y(1))^3];
end
%-----------------------------------------------------------------------
function dy=dely(t,y)
dy=[0,0,0,0];
end
%-----------------------------------------------------------------------
function dyp=delyp(t,y)
dyp=[0,0,0,t-1];
end
function y=history(t)
y=[0;0;0;0.1];
end
Thank you!

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Partial Differential Equation Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by