| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
| On this page… |
|---|
In simulation, the code generated for your Embedded MATLAB Function block includes the following runtime checks:
Memory integrity checks
These checks detect violations of memory integrity in code generated for Embedded MATLAB Function blocks and stop execution with a diagnostic message.
Responsiveness checks in code generated for Embedded MATLAB Function blocks
These checks enable periodic checks for Ctrl+C breaks in code generated for Embedded MATLAB functions. Enabling responsiveness checks also enables graphics refreshing.
Generally, generating code with runtime checks enabled results in more lines of generated code and slower simulation than generating code with the checks disabled. Disabling runtime checks usually results in streamlined generated code and faster simulation, with these caveats:
| Consider disabling... | Only if... |
|---|---|
| Memory integrity checks | You are sure that your code is safe and that all array bounds and dimension checking is unnecessary. |
| Responsiveness checks | You are sure that you will not need to stop execution of your application using Ctrl+C. |
Embedded MATLAB Function blocks enable runtime checks by default, but you can disable them explicitly for all Embedded MATLAB Function blocks in your Simulink model. Follow these steps:
Open your Embedded MATLAB Function block.
In the Embedded MATLAB Editor, select Tools > Open Simulation Target.
The Configuration Parameters dialog box opens with Simulation Target selected.
Under the Embedded MATLAB and Stateflow panel, clear the Ensure memory integrity or Ensure responsiveness check boxes, as applicable, and click Apply.
![]() | Speeding Up Simulation with the Basic Linear Algebra Subprograms (BLAS) Library | PrintFrame Editor | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |