Main Content

Code Verification

R2026b
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
coder.runTestRun test replacing calls to MATLAB functions with calls to MEX functions

Topics

Testing Generated Code

Run-Time Error Detection

Featured Examples