function [y,Y]=go(x,y,t,tmax,xmax,nx,dt,Dr,alpha,Dl,c3)

nt=0;
ntplot=1;
fig1=figure(1);
lin1=line(x,real(y),'EraseMode','background');
axis([0 xmax -1 1]);
drawnow;

Y=y';

% backward Euler only on derivatives
% forward Euler on nonlinear term
while t < tmax
Yc=((1-i*c3)*((abs(Y)).^2).*Y);
rhs=Dr*Y-Yc;
Y=Dl\rhs;
y=Y';

if rem(nt,ntplot) == 0
delete(lin1);
lin1=line(x,real(y),'EraseMode','background');
drawnow;
end

nt=nt+1;
t=t+dt;
end

