1 Introducing the MATLAB Compiler
1-8
Figure 1-1: Developing MEX-Files
MATLAB users who do not have the MATLAB Compilermust write the source
code for M EX-files in either Fortran or C. “External Interfaces/API” explains
the fundamentals of this process. To write MEX-files, you have to know how
MATLAB represents its supported data types and the MATLAB external
interface (i.e., the application program interface, or API.)
If you are comfortable writing M-files and have the MATLAB Compiler, then
you do not have to learn all the details involved in writing MEX-file source
code.
M-File
mcc -x
mex
C version of
M code
MEX Math Library
(libmatlbmx)
C MEX-File
Wrapper
MEX-File
• Shaded block is user-written code.
• Shadowed blocks are MathWorks
tools.
• Unshaded blocks are MATLAB
Compiler-generated code.
• Dotted block is C/C++
compiler-generated executable.
Comments to this Manuals