function [y]=eckhaus(nx,dx,y)

x=[1:nx]*dx;

ampp=input(' amplitude of modulation:');
nwavep=input(' number of periods nwave:');

yp=[y(nx),y(1:nx-1)];
ym=[y(2:nx),y(1)];

y=y+ampp*sin(2*pi*nwavep*x/(nx*dx)).*(yp-ym)/(2*dx);

