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 Function block includes the following run-time checks:

When to Disable Run-Time Checks

Generally, generating code with run-time checks enabled results in more lines of generated code and slower simulation than generating code with the checks disabled. Disabling run-time checks 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.

How to Disable Run-Time Checks

MATLAB Function blocks enable run-time checks by default, but you can disable them explicitly for all MATLAB Function blocks in your Simulink model. Follow these steps:

  1. Open your MATLAB Function block.

  2. In the MATLAB Function Block Editor, select Tools > Open Simulation Target.

    The Configuration Parameters dialog box opens with Simulation Target selected.

  3. Clear the Ensure memory integrity or Ensure responsiveness check boxes, as applicable, and click Apply.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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