Before proceeding, to make sure that everyone works with the same problem size, be sure to set
S=[20; 25; 30];in ``setup.m''.
In this problem, we implement preconditioning, line minimization, and conjugate gradients. To track the convergence properties of the various techniques, each function will return, as an optional second argument, the list of energies at each stage of the minimization. We begin by adding this capability to sd().