MATLAB Acceleration

Techniques for accelerating MATLAB algorithms and applications

There are several ways to accelerate MATLAB algorithms and applications. The optimal approach depends on your programming expertise, the type of algorithms you wish to accelerate, and the hardware available to you.

Top 5 MATLAB Acceleration Techniques

  1. Adopt Efficient (Serial) Programming Practices

    It’s a good practice to optimize your serial code for performance before considering other approaches. Two effective programming techniques for MATLAB acceleration are preallocation and vectorization.

  2. Leverage Existing Optimized Algorithms

    MATLAB and related toolboxes have already been optimized for performance. For example, System objects are object-oriented implementations of MATLAB algorithms that can accelerate MATLAB code, particularly for signal processing and communications applications.

  3. Use Parallel Computing

    Multicore CPUs, GPUs, and clusters can accelerate MATLAB code. High-level parallel constructs in Parallel Computing Toolbox let you take advantage of high-performance hardware with minimal programming effort. The toolbox also enables the parallel computing support found in many functions and algorithms in MATLAB products.

  4. Generate C Code from MATLAB Code

    To accelerate some MATLAB algorithms, you can generate readable and portable C code and compile it into a MATLAB executable. MATLAB Coder generates code from a broad range of MATLAB language features and more than 1300 operators and functions from MATLAB and companion toolboxes.

  5. All of the Above

    For some applications, you can combine these methods for additional MATLAB acceleration.

Examples and How To

Software Reference

See also: Parallel Computing Toolbox, MATLAB Distributed Computing Server, MATLAB Coder, DSP System Toolbox, Communications System Toolbox, MATLAB multicore, MATLAB GPU computing, parallel computing, Parallel Computing on the Cloud with MATLAB