history = [80; 30]; tspan = [0, 100]; opts = ddeset('RelTol',1e-5,'AbsTol',1e-8); a = 0.25; b = -0.01; c = -1.00; d = 0.01; % Solve the ODEs that arise when there is no delay. sol0 = dde23('prob1f',[],history,tspan,opts,a,b,c,d); % Solve the DDEs that arise when there is a delay of tau. tau = 1; sol1 = dde23('prob1f',tau,history,tspan,opts,a,b,c,d); plot(sol0.y(1,:),sol0.y(2,:),sol1.y(1,:),sol1.y(2,:)) title('Problem 1. Solution with and without delay.') xlabel('y_1(t)') ylabel('y_2(t)') legend('No delay',['Delay \tau = ',num2str(tau)],2)