Download MATLAB Compiler User`s Guide

Transcript
6
The Generated Code
Header Files
The MATLAB Compiler generates these #include preprocessor statements:
#include
#include
#include
#include
<math.h>
"matrix.h"
"mcc.h"
"matlab.h"
The included header files are:
Header File
Contains Declarations and Prototypes
math.h
ANSI C Math Library
matrix.h
Matrix Access Routines
mcc.h
MATLAB Compiler Library
matlab.h
MATLAB C Math Library
mlf Function Declaration
This section explains the function that the MATLAB Compiler generates when
you specify the –e option flag. Note that the generated function is completely
different than the MEX-file gateway function.
Name of Generated Function
The MATLAB Compiler assigns the name of a C function by placing the mlf
prefix before the M-file function name. For example, compiling a function
M-file named squibo produces a C function named mlfSquibo.
The MATLAB Compiler ignores the case of the letters in the input M-file
function name. The output function name capitalizes the first letter and puts
all remaining letters in lower case. For example, compiling an M-file function
named sQuIBo produces a C function named mlfSquibo.
If the input M-file function is named main, then the MATLAB Compiler names
the C function main, rather than mlfMain.Using the –m option flag also forces
the MATLAB Compiler to name the C function main. (See the description of the
mcc reference page in Chapter 8 for further details.)
6-12