Simulink random number generation same seed in model and code generation
The Simulink Random Number block allows seeding with a positive integer (as a double type). When generating C code the seed is converted to a uint32 but it is not obvious how.
I can call the generated code and set a seed (as a uint32), how could i set the same seed in the Simulink Model? I need to run from the same seed in both Simulink and C, being able to set each at the start of a run (rather than regenerate C with new seed)The Simulink Random Number block allows seeding with a positive integer (as a double type). When generating C code the seed is converted to a uint32 but it is not obvious how.
I can call the generated code and set a seed (as a uint32), how could i set the same seed in the Simulink Model? I need to run from the same seed in both Simulink and C, being able to set each at the start of a run (rather than regenerate C with new seed) The Simulink Random Number block allows seeding with a positive integer (as a double type). When generating C code the seed is converted to a uint32 but it is not obvious how.
I can call the generated code and set a seed (as a uint32), how could i set the same seed in the Simulink Model? I need to run from the same seed in both Simulink and C, being able to set each at the start of a run (rather than regenerate C with new seed) simulink, random number generator MATLAB Answers — New Questions