Translating MATLAB algorithms to C code involves specifying implementation requirements. MATLAB Coder guides you through this iterative process while enabling you to stay within the MATLAB language. You ensure that your algorithm is compliant for code generation by generating a MEX function that wraps the compiled code for execution back within MATLAB. MATLAB Coder produces a report that identifies any errors which must be fixed to make your MATLAB algorithm compliant for code generation. You iterate between fixing errors and regenerating a MEX function until your MATLAB algorithm is suitable for code generation.
You can now generate either C or C++ source code or a MEX function tuned for performance from your MATLAB algorithm.
C or C++ source code enables you to:
The MEX function can be called in place of the original MATLAB code to: