function test3
clear;
clc;
syms m
lags=[1]; tspan=[0,10];
sol=dde23(@ddefun,lags,@history,tspan);
plot(sol.x,sol.y);
title('ddefun');xlabel('t');ylabel('y');
legend('y_1','y_2',2);
function dydt=ddefun(t,y,Z)
ylag1=Z(:,1);
a1=-9.3;b11=-1.11;b12=-1.32;a2=-1.2;b21=-2.8;b22=-8.8;c11=-1.8;c12=-0.1;c21=-0.3;c22=-2.8;d11=-2.8;d12=-3.1;d21=-1.3;d22=-4.8;h=1;
dydt=[
a1*(y(1))+b11*tanh(y(1))+b12*tanh(y(2))+c11*tanh(ylag1(1))+c12*tanh(ylag1(2))+d11*int(tanh(y(m)),0,1)+d12*int(tanh(y(m)),0,1)-1*y(1);
a2*(y(2))+b21*tanh(y(1))+b22*tanh(y(2))+c21*tanh(ylag1(1))+c22*tanh(ylag1(2))+d21*int(tanh(y(m)),0,1)+d22*int(tanh(y(m)),0,1)-1*y(1);
];
function S=history(t)
S=ones(2,1);
fun(int tt[][n], int pp[]),所以m,n未定义。如果需要m,n,只号将m,n单独传递进去。