Skip to Main Content Skip to Search
Product Documentation

Controlling Run-Time Checks

Types of Run-Time Checks

In simulation, the code generated for your MATLAB functions includes the following run-time checks and external function calls.

When to Disable Run-Time Checks

Generally, generating code with run-time checks enabled results in more generated code and slower simulation than generating code with the checks disabled. Similarly, extrinsic calls are time consuming and have an adverse effect on performance. Disabling run-time checks and extrinsic calls usually results in streamlined generated code and faster simulation, with these caveats:

Consider disabling...Only if...
Memory integrity checksYou are sure that your code is safe and that all array bounds and dimension checking is unnecessary.
Responsiveness checksYou are sure that you will not need to stop execution of your application using Ctrl+C.
Extrinsic callsYou are only using extrinsic calls to functions that do not affect application results.

How to Disable Run-Time Checks

To disable run-time checks:

  1. Define the compiler options object in the MATLAB workspace by issuing a constructor command:

    comp_cfg = coder.MEXConfig
  2. From the command line set the IntegrityChecks, ExtrinsicCalls, or ResponsivenessChecks properties false, as applicable:

    comp_cfg.IntegrityChecks = false;
    comp_cfg.ExtrinsicCalls = false;
    comp_cfg.ResponsivenessChecks = false;

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS