www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/EvaluateDDEWithConstantDelaysExample.m

    %% Evaluate DDE with Constant Delays 
% This example solves the DDE equation |y' = ddex1de(t,y,Z)| using |dde23|,
% then plots the solution.

%%
% Solve the system using |dde23|.
sol = dde23(@ddex1de, [1 0.2], @ddex1hist, [0 5]);

%%
% Evaluate the solution at 100 points in the interval |[0 5]|.
x = linspace(0,5);
y = deval(sol,x);

%%
% Plot the solution.
plot(x,y)