Download MATLAB Compiler User`s Guide
Transcript
Stand-Alone C++ Code Generated by mcc -p Stand-Alone C++ Code Generated by mcc -p This section explains the structure of the C++ code generated by the MATLAB Compiler. Unlike the MEX-file code and the stand-alone C code, the stand-alone C++ code is not divided into a complex branch and a real branch. The generated C++ mixes complex and real computations in a single body of code. This makes the code more concise and more readable. #include Header Files Constants and Static Variables Function Declaration Function Body Declare variables. Count input/output arguments. Perform complex calculations. Return output arguments. Figure 6-3: Structure of Stand-Alone C++ Source Code Generated by Compiler Header Files All generated C++ functions include two header files: #include <iostream.h> #include "matlab.hpp" 6-17