Main Content

MATLABAlgorithm Acceleration

Acceleration using generated MEX functions

Accelerate computationally intensive portions of your MATLAB®code by generating a MEX function. For best results, follow best practices and use optimization strategies.

Functions

codegen Generate C/C++ code fromMATLABcode

Topics

Workflow for Accelerating MATLAB Algorithms

遵循工作流加速MATLAB的寒冷ithms.

Accelerate MATLAB Algorithms

Accelerate MATLAB algorithms by generating MEX functions.

Generate MEX Functions by Using the MATLAB Coder App

Follow the workflow for generating MEX functions with theMATLAB Coder™应用程序。

Generate MEX Functions at the Command Line

Follow the workflow for generating MEX functions withcodegen.

Code Generation for Incremental Learning(Statistics and Machine Learning Toolbox)

Generate code that implements incremental learning for binary linear classification at the command line.

Best Practices for Using MEX Functions to Accelerate MATLAB Algorithms

Follow best practices for using MEX functions to accelerate MATLAB algorithms.

Profile MEX Functions by Using MATLAB Profiler

See execution times and code coverage for generated MEX functions in MATLAB Profiler.

Control Run-Time Checks

Improve performance by disabling run-time checks.

Optimization Strategies

Optimize the execution speed or memory usage of generated code.

Use Generated Code to Accelerate an Application Deployed with MATLAB Compiler

UseMATLAB Coderto accelerate an algorithm used by an application that you intend to deploy withMATLAB Compiler™.

Featured Examples