MATLAB: How to use the Mersenne “Twister” algorithm to generate random numbers form the Uniform Random Number Block in Simulink

simulink

I want to use the Mersenne "Twister" algorithm to generate Random numbers from the Uniform Random Number block.

Best Answer

The ability to use the Mersenne "Twister" algorithm to generate random numbers from the Uniform Random Number block is not available in Simulink.
To work around the issue, try one of the following:
1. Use the RAND function in an Embedded MATLAB function with 'twister' as the method.
2. Use the RAND function in MATLAB to create the data and use the Inport or FromWorkspace block to bring this data into Simulink.