External Interfaces |
MEX-File Placement
For MATLAB to be able to execute your C or Fortran functions, you must either put the compiled MEX-files containing those functions in a directory on the MATLAB path, or run MATLAB in the directory in which they reside. Functions in the current working directory are found before functions on the MATLAB path.
Type path
to see what directories are currently included in your path. You can add new directories to the path either by using the addpath
function, or by selecting the File->SetPath... menu item to edit the path.
If you are using a Windows operating system and any of your MEX-files are on a network drive, you should be aware that file servers do not always report directory and file changes correctly. If you change any MEX-files that are on a network drive and you find that MATLAB is not using your latest changes, you can force MATLAB to look for the correct version of the file by changing directories away from and then back to the directory in which the files reside.
Using MEX-Files | The Distinction Between mx and mex Prefixes |
© 1994-2005 The MathWorks, Inc.