Gradient-Descent Demonstration in Matlab
GDDEMO runs a little demonstration of gradient descent in Matlab. Download and unzip this file, change to the gddemo directory, launch Matlab, and type gddemo to get started. Click in the space above the error surface to drop a ball onto it. Ball descends gradient using local search (negative hill-climbing), after which final weights are shown by intersecting lines on axes. Click on the axes below the error surface to show the error at the corresponding weights. You can write your own errfun.m if you want a different error function. Have fun, and contact me with any questions or comments.