Main Content

Using MEX Functions That MATLAB Coder Generates

When you specify MEX for the output (build) type, MATLAB® Coder™ generates a binary MATLAB executable (MEX) version of your MATLAB function. You can call the MEX function from MATLAB. See MEX File Functions.

How you use the MEX function depends on your goal.

GoalSee
Accelerate your MATLAB function.MATLAB Algorithm Acceleration
Test generated function for functionality and run-time issues.Why Test MEX Functions in MATLAB?
Debug your MEX function.Debug Run-Time Errors