function ret = system1d()
for p=-0.5:0.2:4.8

y=-1:0.05:4;
x=-0.3*(y.^3-4*y.^2+2*y+p);

tau=0.01;
tspan=0:tau:4;


v=-1:0.05:4;
ss=size(v,2);

sim=zeros(ss,1);
ind=1;

for t=tspan
  for n=1:ss
   v(n)=v(n)-tau*(v(n)^3-4*v(n)^2+2*v(n)+p);
   sim(n,ind)=v(n);
  end
  ind=ind+1;
end


figure;
hold on;
for n=1:ss
  plot(tspan,sim(n,:))
end
axis([-1.5,3,-1.3,4.1]);
plot(-x,y,'r','LineWidth',2);
hold off

end

