| MATLAB Compiler | ![]() |
Introduction
Suppose you want to create an application that calculates the rank of a large magic square. One way to create this application is to code the whole application in C or C++; however, this would require writing your own magic square, rank, and singular value routines. An easier way to create this application is to write it as one or more M-files, taking advantage of the power of MATLAB and its tools.
You can create MATLAB applications that take advantage of the mathematical functions of MATLAB, yet do not require that end users own MATLAB. Stand-alone applications are a convenient way to package the power of MATLAB and to distribute a customized application to your users.
The source code for stand-alone C applications consists either entirely of M-files or some combination of M-files, MEX-files, and C or C++ source code files.
The MATLAB Compiler takes your M-files and generates C source code functions that allow your M-files to be invoked from outside of interactive MATLAB. After compiling this C source code, the resulting object file is linked with the run-time libraries. A similar process is used to create C++ stand-alone applications.
You can call MEX-files from Compiler-generated stand-alone applications. The MEX-files will then be loaded and called by the stand-alone code.
| Stand-Alone Applications | C Stand-Alone Application Target | ![]() |
© 1994-2005 The MathWorks, Inc.