I tried a breakpoint in a similar model and it worked. I then realized that the function is not running; my Simulink error is a coder error.
Breakpoint in Simulink MATLAB function block not working
27 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I add a breakpoint to the code in my MATLAB function block in Simulink. I am running Simulink from a script using sim and it does not stop at the breakpoint. It is running the function because Simulink errors are being generated from functions called by the function block.
0 commentaires
Réponse acceptée
Plus de réponses (1)
Fangjun Jiang
le 13 Nov 2023
Try sim("modelName","Debug","on")?
2 commentaires
Fangjun Jiang
le 13 Nov 2023
Then it is better to run simulation interactively to debug it, although you could use sldebug().
Voir également
Catégories
En savoir plus sur Schedule Model Components dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!