28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2mex<br />

Purpose Compile MEX-function from C or Fortran source code<br />

Syntax mex options filenames<br />

Description mex options filenames compiles a MEX-function from the C, C++, or Fortran<br />

source code files specified in filenames. All nonsource code filenames passed<br />

as arguments are passed to the linker without being compiled.<br />

All valid options are shown in the MEX Script Switches table. These options<br />

are available on all platforms except where noted.<br />

MEX’s execution is affected both by command-line options and by an options<br />

file. The options file contains all compiler-specific information necessary to<br />

create a MEX-function. The default name for this options file, if none is<br />

specified with the -f option, is mexopts.bat (Windows) and mexopts.sh<br />

(UNIX).<br />

Note The MathWorks provides an option, setup, for the mex script that lets<br />

you set up a default options file on your system.<br />

On UNIX, the options file is written in the Bourne shell script language. The<br />

mex script searches for the first occurrence of the options file called mexopts.sh<br />

in the following list:<br />

The current directory<br />

The user profile directory (returned by the prefdir function)<br />

The directory specified by [matlabroot '/bin']<br />

mex uses the first occurrence of the options file it finds. If no options file is<br />

found, mex displays an error message. You can directly specify the name of the<br />

options file using the -f switch.<br />

Any variable specified in the options file can be overridden at the command line<br />

by use of the = command-line argument. If has spaces in it,<br />

then it should be wrapped in single quotes (e.g., OPTFLAGS='opt1 opt2'). The<br />

definition can rely on other variables defined in the options file; in this case the<br />

variable referenced should have a prefixed $ (e.g., OPTFLAGS='$OPTFLAGS<br />

opt2').<br />

mex<br />

2-1447

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!