randsrc() in SimEvents simulink

6 ビュー (過去 30 日間)
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.

採用された回答

Sean de Wolski
Sean de Wolski 2021 年 3 月 30 日
Put this before it:
coder.extrinsic('randsrc')
  1 件のコメント
Maria del Mar Morejón de Girón Albelda
Worked perfectly! Thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDiscrete-Event Simulation についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by