作业帮 > 英语 > 作业

MatLAB 中解时滞微分方程 怎么写?

来源:学生作业帮 编辑:作业帮 分类:英语作业 时间:2024/05/24 17:17:11
MatLAB 中解时滞微分方程 怎么写?
MatLAB中解时滞微分方程sol=dde23(ddefun,tau,history,tspan,options)
ddetun:描述延迟微分方程的句柄
tau=[tau1,tau2,...,taun]
延迟微分方程function dx=ddefun(t,x,z)
我想问的是 这里的Z表示的是什么?是个关于延迟的向量?
例如
function dx=ddefun(t,x,z)
dx=[1-3*x(1)-A-0.2*B^3-tau2(1)
x(3)
4*x(1)-2*x(2)-3*x(3)];
我这里A想表示为x2(t-tau1),B想表示为x1(t-tau2),这个A和B该怎么写?这里Z具体表示的是什么东西?
希望有人能回答,
这是matlab中dde23的例子,通过这个例子,应该能看懂dde23个参数的作用.直接复制后边的代码就可以输出图形.
%DDEX1 Example 1 for DDE23.
% This is a simple example of Wille' and Baker that illustrates the
% straightforward formulation,computation,and plotting of the solution
% of a system of delay differential equations (DDEs).
%
% The differential equations
%
% y'_1(t) = y_1(t-1)
% y'_2(t) = y_1(t-1)+y_2(t-0.2)
% y'_3(t) = y_2(t)
%
% are solved on [0,5] with history y_1(t) = 1,y_2(t) = 1,y_3(t) = 1 for
% t
再问: Z表示x1(t-tau1) x2(t-tau1) x3(t-tau1) ...xn(t-tau1) 这样的n*n一个矩阵? x1(t-tau2) x2(t-tau2) x3(t-tau2) ...xn(t-tau2) ................................................................. x1(t-taun) x2(t-taun) x3(t-taun) ...xn(t-taun) 所以ylag1 = Z(:,1)就表示成一列向量[x1(t-tau1) x1(t-tau2) ...x1(t-taun)]' 所以ylag1(1)表示的就是x1(t-tau1) 我不知道我这么理解对不?
再答: Z是初始值,在例子中y是一个3*1的列向量,所以z也是3*1 ,z的维数看你具体的方程
再问: ???tau1,tau2....taun 肯定都是初始值。 Z是3*1的列向量?那ylag2 = Z(:,2);如何理解?这个不是表示取第二列所有行的元素吗?
再答: 在ddefun中的z是y相对于t-tau1,t-tau2,t-tau3....t-tauj时的历史数据的集合