| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop |
| Contents | Index |
| Learn more about Real-Time Workshop |
The discussion of block state storage in this section applies to the following blocks:
Discrete Filter
Discrete State-Space
Discrete-Time Integrator
Discrete Transfer Function
Discrete Zero-Pole
Memory
Unit Delay
These blocks require persistent memory to store values representing the state of the block between consecutive time intervals. By default, such values are stored in a data type work vector. This vector is usually referred to as the DWork vector. It is represented in generated code as model_DWork, a global data structure. For more information on the DWork vector, see the Target Language Compiler documentation.
If you want to interface a block state to your hand-written code, you can specify that the state is to be stored in a location other than the DWork vector. You do this by assigning a storage class to the block state.
You can also define a symbolic name, to be used in code generation, for a block state.
![]() | Introduction | Block State Storage Classes | ![]() |

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 |