Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB Compiler   

Common Uses of MATLAB Compiler

Create a Standalone Application

Example 1

To create a standalone application from mymfile.m, use

mcc -m mymfile

Example 2

To create a standalone application from mymfile.m, look for mymfile.m in the folder /files/source, and put the resulting C files and in /files/target, use

mcc -m -I /files/source -d /files/target mymfile

Example 3

To create a standalone application mymfile1 from mymfile1.m and mymfile2.m using a single mcc call, use

mcc -m mymfile1 mymfile2

Create a Library

Example 1

To create a C shared library from foo.m, use

mcc -l foo.m

Example 2

To create a C shared library called library_one from foo1.m and foo2.m, use

mcc -W lib:library_one -T link:lib foo1 foo2

  


Free MATLAB Compiler Interactive Kit

Learn how to build standalone executables and C/C++ shared libraries from MATLAB code.


Get free kit

Trials Available

Try the latest version of MATLAB Compiler.


Get trial software
 © 1984-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS