There are both M-files and MEX files coded in C to handle some loop intensive operations. It is provided with no claims to its quality or suitability for specific tasks. Any use of the code should acknowledge its source. The code is copyrighted material and should not be modified or altered without the permission of the author. Use for commercial purposes should not be undertaken with permission of the author.
Comments are welcome.
There is also a ZIP file with the M-files discussed in the primer. Use them as you see fit. This is a zip file that contains a set of functions for solving and analyzing dynamic programming problems with discrete state and action spaces. It contains a Postscript file explaining the problem and the code. Distance Matrix Code A zip file containing code to compute a distance function.