Documentation Center

  • Trial Software
  • Product Updates

Improve Acceleration Mode Performance


To get the best performance when accelerating your models:

  • Verify that the Configuration Parameters dialog box settings are as follows:

    On this pane...Set...To...
    Solver DiagnosticsSolver data inconsistencynone
    Data Validity DiagnosticsArray bounds exceedednone
    OptimizationSignal storage reuseselected

  • Disable Stateflow® debugging and animation.

  • Inline user-written S-functions (these are TLC files that direct the Simulink® Coder™ software to create C code for the S-function). See Control S-Function Executionfor a discussion on how the Accelerator mode and Rapid Accelerator mode work with inlined S-functions.

    For information on how to inline S-functions, consult Insert S-Function Code.

  • When logging large amounts of data (for instance, when using the Workspace I/O, To Workspace, To File, or Scope blocks), use decimation or limit the output to display only the last part of the simulation.

  • Customize the code generation process to improve simulation speed. For details, see Customize the Build Process.

C Compilers

On computers running the Microsoft® Windows® operating system, the Accelerator and Rapid Accelerator modes use the default 64-bit C compiler supplied by MathWorks® to compile your model. If you have a C compiler installed on your PC, you can configure the mex command to use it instead. You might choose to do this if your C compiler produces highly optimized code since this would further improve acceleration.

    Note:   For an up-to-date list of 32- and 64-bit C compilers that are compatible with MATLAB® software for all supported computing platforms, see:
Was this topic helpful?