clear all
tend=10;
par=[1,0];
xinit=zeros(1,2*par(2)+2);
xinit(2)=1;
[t,z]=ode15s('modeldelay1',[0,tend],xinit,[],par);

%%
figure(1)
hold off

plot(t,z(:,1),'bs-','markerfacecolor','w')
hold on
aa=[1 2 3 4 5 10 20 40 180]
for n=aa
    par=[1,n];
xinit=zeros(1,2*par(2)+2);
xinit=rand(1,2*par(2)+2);
xinit(1)=0;
xinit(2)=1;
[t,z]=ode15s('modeldelay1',[0,tend+par(1)],xinit,[],par);
plot(t,z(:,1),'Color',[1/n,0,1-1/n^.5])
hold on
end
return
%%
figure(2)
hold off
tend=7;
delta=1;
par=[delta,0];
t=0:.05:tend;
plot(t,sin(t),'bs-',t+1,sin(t),'gs','markerfacecolor','w')
hold on
aa=[1 2 3 4 5 10 20 40 180]
for n=aa
    par=[delta,n];
xinit=zeros(1,par(2));
xinit=rand(1,par(2));
%xinit(1)=0;
[t,z]=ode15s('modeldelay',[0,tend+par(1)],xinit,[],par);
plot(t,z(:,end),'Color',[1/n,0,1-1/n^.5])
end