randsrc() in SimEvents simulink

3 次查看(过去 30 天)
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')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Discrete-Event Simulation 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by