Main Content

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