MATLAB Compiler | ![]() ![]() |
Common Uses of the Compiler
This section summarizes how to use the MATLAB Compiler to generate some of its more standard results. The first four examples take advantage of the macro options.
Create a MEX-File. To translate an M-file named mymfile.m
into C and to create the corresponding C MEX-file that can be called directly from MATLAB, use
Create a Simulink S-Function. To translate an M-file named mymfile.m
into C and to create the corresponding Simulink S-function using dynamically sized inputs and outputs, use
Create a Stand-Alone C Application. To translate an M-file named mymfile.m
into C and to create a stand-alone executable that can be run without MATLAB, use
Create a Stand-Alone C++ Application. To translate an M-file named mymfile.m
into C++ and to create a stand-alone executable that can be run without MATLAB, use
Create a Stand-Alone C Graphics Library Application. To translate an M-file named mymfile.m
that contains Handle Graphics functions into C and to create a stand-alone executable that can be run without MATLAB, use
Create a Stand-Alone C++ Graphics Library Application. To translate an M-file named mymfile.m
that contains Handle Graphics functions into C++ and to create a stand-alone executable that can be run without MATLAB, use
Create a C Library. To create a C library, use
Create a C++ Library. To create a C++ library, use
Create a C Shared Library. To create a C shared library that performs specialized calculations that you can call from your own programs, use
Create MATLAB P-Code. To translate an M-file named mymfile.m
into MATLAB P-code, use
![]() | MATLAB Compiler Quick Reference | mcc | ![]() |