mgs, a Python code which illustrates the problem of legacy code, that is, software that is useful, but out of date, not documented, not well understood, and in need of some new features.
When approaching legacy software, it's useful to try to come up with good documentation for what the program is doing, a set of test problems which must be correctly handled by any new version of the software, and a set of timing problems that can show whether changes to the software have improved its efficiency.
In this case, the student is challenged to make a copy of the source code, read it, try to work out what it is doing, document it, and come up with a nice set of examples illustrating what is going on. A student might also be interested in the task of creating an equivalent version in a different language, and then demonstrating that the two programs produce the same results.
The information on this web page is distributed under the MIT license.
mgs is available in a C version and a C++ version and a Fortran77 version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.
Original MATLAB version by Diane O'Leary. This version by John Burkardt.