Debugging

After running ``sch.m'', have sd() improve $W$ with a relatively low number of iterations, W=sd(W,20);. You should be able to confirm that the energy decreases with each iteration. To check that the return value is correct, verify that getE(W) gives the same result as the most recent printout from sd(). Finally, run sd() with 250 iterations and verify that your result is converging to the analytic answer, E=18.



Tomas Arias 2004-04-23