In this example, the Initialize Function block uses the State Writer block to set the initial condition of a Discrete Integrator block to 10. The Terminate Function block includes a State Reader block, which reads the state of the Discrete Integrator block. The Event type parameter of the Event Listener block for the initialize and terminate functions is set to Initialize
and Terminate
, respectively.
Discrete-Time Integrator | Event Listener | Initialize Function | State Reader | State Writer | Terminate Function