MATLAB solves the delayed differential equation. dde23 call format:
Sol = dde23 (ddefun, lags, history, tspan );
-- Ddefun function handle, solving the Differential EquationY' = f (t, y (t), y (t-Tau 1),..., y (t-Tau k ))
It must be written in the following format:
Dydt = ddefun (T, y, z );
T corresponds to the current time t, and Y is the column vector, which is similar to Y (t); Z (:, j) is similarY (t-Tau J)
-- LagsIs the delay time, positive constant.
For example, if the equation contains y1 (t-0.2) and Y2 (t-1), it can be expressed as lags = [0.2, 1]
-- History T ≤ t0 value of the state variable
-- Tspan integral range T0 = tspan (1), TF = tspan (end ).
* Note: The structures Sol. X and Sol. y returned by this function are arranged in rows, which are different from those returned by ode45.
Take the following example:
Assume that the system state equation is dxdt = AX (t) + bX (t-0.23) + bX (t-0.56); A = [1,-1;], B =; 1, 4].
The procedure is as follows:
(1) Write latency Functions
function dx = ddefun(t,y,Z)A = [0,1;0,j];B = [0,0;-1,-3];tau1= Z(:,1);tau2= Z(:,2);v=A*y+B*ylag1;
(1) Compile the main function
MATLAB for solving delayed Differential Equations