Working with the Reinitialize Function Block
This example shows how to use a Reinitialize Function block to reset the initial condition of a Discrete-Time Integrator block for every function-call event received by a subsystem. In this example, the Reinitialize Function block is inside a subsystem, and the subsystem receives a function-call event at every five simulation time steps.
In this example, a State Writer block inside the Reinitialize Function block is configured to set the initial condition of one of the Discrete-Time Integrator blocks to 10.
For a step-by-step procedure to create this model, see Reinitialize States of Blocks in Subsystem.
Open the model.