Verify MEX Functions in the MATLAB Coder App
In the MATLAB® Coder™ app, you can verify that the generated MEX function has the same functionality as the original MATLAB entry-point function by using a test file that calls the original MATLAB entry-point function. The test file can be a MATLAB function or script. The test file must be in the same folder as the original entry-point function.
To instruct the app to replace calls to the original MATLAB function with calls to the MEX function in the test file, in the MATLAB Coder Toolstrip, click Verify Using MEX > Use generated code. Then, click Run file: Select MATLAB file to run ... and select the test file.
To run the test file without replacing calls to the original MATLAB function with calls to the MEX function, in the MATLAB Coder Toolstrip, click Verify Using MEX > Use MATLAB code. Then, click Run file: Select MATLAB file to run ... and select the test file.