Main Content

Code Verification

Behavioral verification of generated code, traceability, code generation reports

You can test the output of generated MEX code against the original MATLAB® code, or you can create custom tests based on the MATLAB unit test classes. You can choose to generate run-time error checks that alert you to errors that occur during code execution.

Functions

codegenGenerate C or C++ code from MATLAB code
coder.configCreate code generation configuration objects
coder.mfunctionnameName of calling function or method (Since R2021b)
coder.runTestRun test replacing calls to MATLAB functions with calls to MEX functions

Topics

Testing Generated Code

Run-Time Error Detection

Featured Examples