时滞微分方程求解之三ddesd--变时滞

来源:互联网 发布:网络推广代理公司 编辑:程序博客网 时间:2024/05/01 04:51

考虑下面的变时滞微分方程


试绘制上述含有时变时滞微分方程图像

分析该方程应该在某个t0时间之后成立,初始值必须是定义在t0之前的一个关于t的单值向量函数phi(t)。

我假设t0=0吧,phi(t)=[1;-1];

matlab程序:

function ddeex
t0 = 0;
tfinal = 5;
tspan = [t0, tfinal];
sol = ddesd(@ddefun,@delay,@hist,tspan);
plot(sol.x,sol.y,'.-')
xlabel('time')
ylabel('value')
legend('x','y')


function d=delay(t,y)
  d=[t-sin(t);t-cos(t);t-2;t-1];


function h=hist(t)
  h=[1;-1];


function dydt = ddefun(t,y,Z)   
  dydt = [1-0.05*Z(1,1)-0.04*Z(2,2); 2-0.02*Z(1,3)-0.7*Z(2,4)];


图像如下


引自:http://www.ilovematlab.cn/thread-264248-1-1.html

状态依赖的时滞微分方程matlab求解可参考:

http://cn.mathworks.com/help/matlab/math/state-dependent-delay-problem.html

0 0
原创粉丝点击