function f=leader(t,e) f(1)=-10*e(1)+2*e(1)-0.1*e(2)-0.2*e(1)+0.1*e(3)+0.1*e(5)+0.3*e(7)-0.3*e(9); f(2)=-10*e(2)-3*e(1)+1.5*e(2)-0.2*e(2)+0.1*e(4)+0.1*e(6)+0.3*e(8)-0.3*e(10); f(3)=-10*e(3)+2*e(3)-0.1*e(4)+0.4*e(1)-0.5*e(3)+0.1*e(5)-0.2*e(7)+0.2*e(9); f(4)=-10*e(4)-3*e(3)+1.5*e(4)+0.4*e(2)-0.5*e(4)+0.1*e(6)-0.2*e(8)+0.2*e(10); f(5)=-10*e(5)+2*e(5)-0.1*e(6)+0.3*e(1)-0.1*e(3)-0.2*e(5)+0.1*e(7)-0.1*e(9); f(6)=-10*e(6)-3*e(5)+1.5*e(6)+0.3*e(2)-0.1*e(4)-0.2*e(6)+0.1*e(8)-0.1*e(10); f(7)=-10*e(7)+2*e(7)-0.1*e(8)+0.2*e(1)-0.4*e(3)+0.2*e(5)-0.2*e(7)+0.2*e(9); f(8)=-10*e(8)-3*e(7)+4.5*e(8)+0.2*e(2)-0.4*e(4)+0.2*e(6)-0.2*e(8)+0.2*e(10); f(9)=-10*e(9)+2*e(9)-0.1*e(10)+0.3*e(1)-0.2*e(3)-0.1*e(5)+0.1*e(7)-0.1*e(9); f(10)=-10*e(10)-3*e(9)+4.5*e(10)+0.3*e(2)-0.2*e(4)-0.1*e(6)+0.1*e(8)-0.1*e(10); end帮我在这个函数中加入无穷分布时滞项
时间: 2023-12-18 22:03:36 浏览: 128
可以将原来的函数改为带有无穷分布时滞项的形式,具体实现方法如下:
function f=leader(t,e)
delay = rand*inf; % 生成一个随机的无穷分布时滞
f(1)=-10*e(1)+2*e(1)-0.1*e(2)-0.2*e(1+delay)+0.1*e(3)+0.1*e(5)+0.3*e(7)-0.3*e(9);
f(2)=-10*e(2)-3*e(1+delay)+1.5*e(2)-0.2*e(2+delay)+0.1*e(4)+0.1*e(6)+0.3*e(8)-0.3*e(10);
f(3)=-10*e(3)+2*e(3)-0.1*e(4+delay)+0.4*e(1)-0.5*e(3+delay)+0.1*e(5)-0.2*e(7)+0.2*e(9);
f(4)=-10*e(4)-3*e(3+delay)+1.5*e(4)+0.4*e(2)-0.5*e(4+delay)+0.1*e(6)-0.2*e(8)+0.2*e(10);
f(5)=-10*e(5)+2*e(5)-0.1*e(6+delay)+0.3*e(1)-0.1*e(3)-0.2*e(5+delay)+0.1*e(7)-0.1*e(9);
f(6)=-10*e(6)-3*e(5+delay)+1.5*e(6)+0.3*e(2)-0.1*e(4)-0.2*e(6+delay)+0.1*e(8)-0.1*e(10);
f(7)=-10*e(7)+2*e(7)-0.1*e(8+delay)+0.2*e(1)-0.4*e(3)+0.2*e(5)-0.2*e(7+delay)+0.2*e(9);
f(8)=-10*e(8)-3*e(7+delay)+4.5*e(8)+0.2*e(2)-0.4*e(4)+0.2*e(6)-0.2*e(8+delay)+0.2*e(10);
f(9)=-10*e(9)+2*e(9)-0.1*e(10+delay)+0.3*e(1)-0.2*e(3)-0.1*e(5)+0.1*e(7)-0.1*e(9+delay);
f(10)=-10*e(10)-3*e(9+delay)+4.5*e(10)+0.3*e(2)-0.2*e(4)-0.1*e(6)+0.1*e(8)-0.1*e(10+delay);
end
其中,使用 rand 函数生成一个随机的无穷分布时滞 delay,然后在计算状态方程时,对于每个状态变量,都在下标中加入 delay,以实现无穷分布时滞的效果。
阅读全文