| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Embedded MATLAB |
| Contents | Index |
| On this page… |
|---|
Checking for Violations at Design Time |
The Embedded MATLAB subset supports the embeddable subset of MATLAB features, operators, and functions. The first step in making your MATLAB code compliant with the Embedded MATLAB subset is to eliminate unsupported constructs.
You use the M-Lint code analyzer in the MATLAB Editor check for code violations at design time, minimizing compilation errors. M-Lint continuously checks your code as you enter it. It reports problems and recommends modifications to maximize performance and maintainability.
To use M-Lint to identify warnings and errors specific to the Embedded MATLAB subset, you must add the %#eml compilation directive (or pragma) to your M-file. (You can try this in Making the LMS Filter Code Embedded MATLAB Compliant.) A complete list of Embedded MATLAB M-Lint messages is available in the MATLAB M-Lint preferences. See Using M-Lint for more details.
You can use Embedded MATLAB MEX (emlmex) to check for violations at code generation time. emlmex checks M-code for compliance with Embedded MATLAB syntax and semantics, as described in Working with the Embedded MATLAB Subset in the Embedded MATLAB User's Guide.
When emlmex detects errors or warnings, it automatically generates an error report that describes the issues and provides links to the offending M-code. See Working with Compilation Reports in the Embedded MATLAB User's Guide.
After successful compilation, emlmex generates a MEX function that you can use to test your implementation in MATLAB.
The next section of the tutorial, Making the LMS Filter Code Embedded MATLAB Compliant, shows you how to use M-Lint and emlmex to make the LMS Filter code compliant with the Embedded MATLAB subset.
![]() | Making Your M-Code Compliant with the Embedded MATLAB Subset | Making the LMS Filter Code Embedded MATLAB Compliant | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |