Calls to coder.extrinsic in inner-level of Matlab/Simulink
Afficher commentaires plus anciens
Hi. I need to generate random numbers in normal distribution in Simulink. I use this code in one of my functions:
coder.extrinsic('random');
x=random('rand',0,1);
but I'm getting this error:
Calls to coder.extrinsic may only appear at the top-level.
Is there anyone to help me?
Réponse acceptée
Plus de réponses (1)
Steven Lord
le 7 Août 2015
0 votes
There's a block to do this. Perhaps you can pass the signal from this block into your function as an input?
1 commentaire
Marie Behzadi
le 8 Août 2015
Catégories
En savoir plus sur Sources dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
