There is an AMPL command
shell "...";
where ... is replaced by any command that can be run from a command-window prompt on your system. You can use this in particular to run the "matlab" command on your system to invoke a MATLAB function. Details depend on what kind of computer you are using, but can be found in the relevant MATLAB documentation. Note that this runs MATLAB as a separate process, so you will have to manage communication between AMPL and MATLAB, possibly through files.
As an alternative you could consider using the MATLAB version of the AMPL API, as described at
http://ampl.com/products/api/, to run AMPL from inside a MATLAB function.
Bob Fourer
am...@googlegroups.com
=======