Main Content

Code Acceleration and Code Generation fromMATLAB

In many cases, you may want your code to run faster and more efficiently.Code accelerationprovides optimizations for accelerating fixed-point algorithms through MEX file building. In Fixed-Point Designer™ thefiaccelfunction converts your MATLAB®code to a MEX function and can greatly accelerate the execution speed of your fixed-point algorithms.

Code generationcreates efficient, production-quality C/C++ code for desktop and embedded applications. There are several ways to use Fixed-Point Designer software to generate C/C++ code.

Use... To... Requires... See...
MATLAB Coder™(codegen(MATLAB Coder)) function Automatically convert MATLAB code to C/C++ code MATLAB Coder代码生ation software license Generate C Code at the Command Line(MATLAB Coder)
MATLAB Function Use MATLAB code in your Simulink®models that generate embeddable C/C++ code Simulink license Implement MATLAB Functions in Simulink with MATLAB Function Blocks

MATLAB code generation supports variable-size arrays and matrices with known upper bounds. To learn more about using variable-size signals, seeCode Generation for Variable-Size Arrays.