randsrc() in SimEvents simulink

3 vues (au cours des 30 derniers jours)
Maria del Mar Morejón de Girón Albelda
I would like to get a random number with different probabilities in a Simevents block but when I use it it says: "Function 'randsrc' not supported for code generation."
Is there a similar function as randsrc but for SimEvents blocks?
Thank you in advance.

Réponse acceptée

Sean de Wolski
Sean de Wolski le 30 Mar 2021
Put this before it:
coder.extrinsic('randsrc')
  1 commentaire
Maria del Mar Morejón de Girón Albelda
Worked perfectly! Thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Discrete-Event Simulation dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by