a=7; tau=1.0; history = [0.0; 0.2]; %initial function history2 = [0.2; 0.2]; %initial function tspan = [0, 40]; opts = ddeset('RelTol',1e-5,'AbsTol',1e-5); % Solve equation sol = dde23('logdist1', tau, history, tspan, opts, a); s2 = dde23('logdist2', tau, history2, tspan, opts, a); figure plot(sol.x, sol.y(2,:), 'k', s2.x, s2.y(2,:), 'r-.'); %legend('x(t)=\int^t_0 y(s)ds', 'y(t)',2); %text(2,0.0025,'Initial condition is y(\theta)=0.00085, \theta\in [-1, 0]','FontSize',10) title('Solutions of y\prime=ay(1-\int^t_{t-1} y(s)ds) with different transformations'); xlabel('time t'); %ylim([0 0.003]); ylabel('y', 'rotation', 0);