User`s guide

UNIX Workstation
2-9
Note The setup option creates a user-specific, matlab directory in your
individual home directory and copies the appropriate options file to the
directory. (If the directory already exists, a new one is not created.) This
matlab directory is used for your individual options files only; each user can
have his or her own default options files (other MATLAB products may place
options files in this directory). Do not confuse these user-specific
matlab
directories with the system matlab directory, where MATLAB is installed.
Using the
setup option resets your default compiler so that the new compiler
is used every time you use the
mex script.
Modifying the Options File. Another use of the setup option is if you want to
change your options file settings. For example, if you want to make a change to
the current linker settings, or you want to disable a particular set of warnings,
you should use the
setup option.
As the previous note says,
setup copies the appropriate options file to your
individual directory. To make your user-specific changes to the options file, you
then edit your copy of the options file to correspond to your specific needs and
save the modified file. This sets your default compilers options file to your
specific version.
Temporarily Changing the Compiler. To temporarily change your C or C++ compiler,
use the
-f option, as in
mex -f <file>
The -f option tells the mex script to use the options file, <file>. If <file> is not
in the current directory, then
<file> must be the full pathname to the desired
options file. Using the
-f option tells the mex script to use the specified options
file for the current execution of
mex only; it does not reset the default compiler.
Creating MEX-Files
To create MEX-files on UNIX, first copy the source file(s) to a local directory,
and then change directory (
cd) to that local directory.