MATLAB: How to reset the initial seed value of a Random Number block when the Enabled Subsystem in which it resides resets its states

simulink

My model contains a Random Number block (from the Simulink Sources library) that resides in an Enabled Subsystem. I would like to reset the Random Number block's initial seed value when its parent subsystem resets its states.

Best Answer

This feature is not available for the Random Number and Uniform Random Number blocks from Simulink's Sources library.
To work around this issue, try using the Random Source block from the Signal Processing Sources library in the Signal Processing Blockset. This block allows you to reset its initial seed value when the Enabled Subsystem that contains it resets its states. However, note that this block uses different random number generator routines.