我想使用MATLAB中的for循环来解决以下DDE:
xdot(t) = Ax(t) + BKx(t-h)
其中:
A = [0 1 ; -1 0.1];
B = [0 ; 1];
h = 0.2;
K = [-0.0469 -1.7663];
t = [0 5]
用传统的方法解决这一问题是简单的,结果是可以接受的。
sol = dde23(ddefun,lags,history,tspan,options,varargin)
然而,当我试图解决它使用for循环,结果是错误的。下面是我的for循环的简单代码。
time = 0:0.001:5;
for i = 2:5001
x(:,1) =