The code kdv solves the KdV equation u_t + uu_x +gamma*u_xxx = 0 using a pseudo spectral method. It uses the function mfile wwprime.m as the right-hand side of the system of ODE's. Initial data must be provided in a function mfile f.m The calls for ode45 are slightly different in MATLAB 4.2 and in MATLAB 5.0. The line in program kdv.m must be changed to agree with the version you are using.