| Embedded MATLAB™ | ![]() |
| On this page… |
|---|
You run Embedded MATLAB MEX from the MATLAB command prompt by using the emlmex function. The basic command is:
emlmex M_fcn
By default, emlmex performs the following actions:
Searches for the function M_fcn stored in the file M_fcn.m as specified in Compile Path Search Order.
Compiles M_fcn, checking for compliance with Embedded MATLAB semantics and syntax.
If there are no errors or warnings, generates a platform-specific C-MEX file in the current directory, using the naming conventions described in Naming Conventions.
If there are errors, does not generate a C-MEX file, but produces an error report in a default output directory, as described in Generated Files and Locations. Error reports are described in Working with Compilation Reports.
If there are warnings, but no errors, generates a platform-specific C-MEX file in the current directory, but does report the warnings.
You can modify this default behavior by specifying one or more compiler options with emlmex, separated by spaces on the command line. See Options for emlmex in the Embedded MATLAB Reference.
Embedded MATLAB MEX generates files in the following locations:
| Generates: | In: |
|---|---|
Platform-specific C-MEX files | Current directory |
HTML reports (if errors or warnings occur during compilation) | Default output directory: emcprj/mexfcn/M_fcn_name/html |
You can change the name and location of generated files by using the options -o and -d when you run Embedded MATLAB MEX (see emlmex).
![]() | Specifying Properties of Primary Function Inputs | Working with Compilation Reports | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |