The Matlab script file nls.m solves the nonlinear Schrodinger equation with the first-order split step Fourier method introduced by Hardin and Tappert. The method is analyzed in "Split-step methods for the solution of the nonlinear Schrodinger equation" by J.A.C. Weideman and B.M. Herbst, SIAM J. Numer. Anal., Vol. 23, pp. 487-507 (1986)
With this code, the well-known recurrence phenomenon of the NLS may be simulated, and displayed as a 3D mesh-plot.
It is easy to modify the code to implement the second-order splitting, and the user is encouraged to do so if efficiency is of concern.
Last updated: December 5, 1997.