Differential equation system with constant delays
1 次查看(过去 30 天)
显示 更早的评论
Hello I need to solve numerically this differential equation with constants delays the history conditions are y1(t)=5 y2(t)=0.1 y3(t)=1, I tried to use dde23 with this code but there is an error:
f1=@(x,t,z)[-x(1)*z(2,2)+z(2,1);x(1)*z(2,2)-x(2);x(2)-z(2,1)]
lags=[10 1]
w=[5;0.1;1]
tspan=[0 40]
sol=ddesd(f1,lags,w,tspan);%En este caso se define función de historial
plot(sol.x,sol.y(1,:),'LineStyle','--')
hold on
plot(sol.x,sol.y(2,:),'LineStyle','-')
plot(sol.x,sol.y(3,:),'Color','g')
axis([0 1 -10 10])
xlabel('t')
legend('x','y')
And I have error
Index exceeds array bounds.
f0 = ddefun(t0,y0,Z0);
I appreciate your help thanks!!!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!