ydelay.m

来自「一个时滞系统的工具箱」· M 代码 · 共 27 行

M
27
字号
function res=ydelay(s,t,tt,xt,initfun,num);
%YDELAY	calculates the lumped delay terms y(-tau(t)),
%	included in the right-hand side of a system of functional
%	differential equations to be solved numerically.
%	For calculations YDELAY uses initial function as well arrays
%	tt, xt used for construction of degenerate cubic splines.
%	YDELAY is used in special functions where user describes
%	the system in order to solve it by the program dde45.
%	For details see descriptions.

s = t+s;
if nargin==6 
  if s<=tt(1) 
    res=eval(initfun); res=res(num);
  else 
    res=Spline3(tt,xt(:,num),s)';
  end;
else
  if s<=tt(1) 
    res=eval(initfun);
  else 
    res=Spline3(tt,xt,s)';
  end;
end
  

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?