To implement the system as described, i.e. to save the values from a previous time points during the 'Enable' state during the 'Disable' state of an 'Enabled Subsytem', please refer to an example model attached to this solution.
The example highlights the following technique:
- Use an input to ENABLE/DISABLE the 'Enabled Subsystem'
- Use a periodic input value to pass to the output via an 'Enabled Subsystem'
- The implementation logic uses a delay block to save the previous time inputs using an assisgnment block. The main idea in this example is to pre-allocate the array size with '0'. Using a counter block, to count the signal index, we can assign to an output vector the value from 'Enable' time points using a SELECTOR block.
Best Answer