Is it possible to use another Simulink block that will feed the seed number to Random Source block in Signal Processing Blockset 6.5 (R2007a)?

1 vue (au cours des 30 derniers jours)
I am using the Random Source block in the Signal Processing Blockset and I would like to control the seed number in that block. I would like to use another Simulink block that will feed the seed number to this block.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 4 Sep 2009
There is no block available in Signal Processing Blockset 6.5 (R2007a) that can be used to feed the seed number to Random Source block in Signal Processing Blockset.
As a workaround, one may use the RAND function inside an Embedded MATLAB Function. It is also possible to feed the seed at the input of the Embedded MATLAB function and use the RAND or RANDN function in the Embedded MATLAB function. See the attached model for an example implementation of this.
Note that the sequence of random numbers produced by the Random Source block in the Signal Processing Blockset and by the RAND function inside the Embedded MATLAB Function may differ, even if the same seed is used.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by