Testing Code Generated from MATLAB Code
MATLAB® Coder™ helps you to test your generated code.
If you use the MATLAB
Coder app to generate a MEX function,
you can test the MEX function in the app. If you use codegen
to
generate a MEX function, test the MEX function by using coder.runTest
. Alternatively, use the codegen
-test
option.
If you have Embedded Coder®, you can verify the numerical behavior of generated C/C++ code by using software-in-the-loop (SIL) or processor-in-the-loop (PIL) execution. You can also produce a profile of execution times.
Related Topics
- Verify MEX Functions in the MATLAB Coder App
- Verify MEX Functions at the Command Line
- Code Verification Through Software-in-the-Loop and Processor-in-the-Loop Execution (Embedded Coder)
- Execution Time Profiling for SIL and PIL (Embedded Coder)
- Unit Test Generated Code with MATLAB Coder
- Unit Test External C Code with MATLAB Coder