function [t,x,y]=ic(nx,dx,xmax)

amp=input(' amplitude:');
nwave=input(' nwave: (0=random)');

x=[1:nx]*dx;

y=amp*exp(i*2*pi*nwave*x/xmax);
   
if nwave == 0
 % random initial conditions
 y=amp*randn(1,nx);
end

t=0;

clf;

