GENMEX - utility to generate mex-files for MATLAB 4.x (and 5) that call fortran (especially NAG) library routines. GENMEX generates a MATLAB mex-file (written in c) that calls given fortran subroutine GENMEX knows about. GENMEX is written and tested in SUN Solaris 2.3 environment and depends on way how fortran routines are called from c-language in Solaris. This is highly experimental and no succeed on using this is guaranteed. Otherwise you are free to use this program. If you modify the source code please let me know. Anyway I'd be glad to know if you find this useful. Install as described in file INSTALL and check the demo .m files with names *_demo.m . There is a set of documentations for GENMEX made by Grant Keady, University of Western Australia (keady@maths.uwa.edu.au), available at http://maths.uwa.edu.au/~keady/genmex/gendoc.html nag_routines.dat-file was converted from InterCall-data files and surely contains errors due the conversion. InterCall is a 'Mathematica-numerical library'-interface by Dr. Terry Robb. InterCall is sold by Analytica, http://www.analytica.com.au. If MATLAB runs into a bus error or segmentation fault when using GENMEX-generated MATLAB-functions it is due to: 1. Error in GENMEX generated c-code. 2. Error in defaults file (length of workspace variables is too small etc.) If fortran routine writes to standard output (channel 6) it also kills the MATLAB session. GENMEX is available from http://www.helsinki.fi/~mjlaine/genmex/genemex.tar.gz. The 'nms'-library from the book: "Numerical Methods and Software" by D. Kahaner, C. Moler, S. Nash, Prentice Hall 1988, which, along with NAG, can be used with GENMEX, is available as http://www.helsinki.fi/~mjlaine/genmex/nms.tar.gz. Check also http://www.helsinki.fi/~mjlaine/genmex/ for extra documentation and updates. Marko Laine University of Helsinki Department of Mathematics Marko.Laine@Helsinki.FI