Breakpoint in Simulink MATLAB function block not working
显示 更早的评论
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.
采纳的回答
更多回答(1 个)
Fangjun Jiang
2023-11-13
0 个投票
Try sim("modelName","Debug","on")?
2 个评论
Scott
2023-11-13
Fangjun Jiang
2023-11-13
Then it is better to run simulation interactively to debug it, although you could use sldebug().
类别
在 帮助中心 和 File Exchange 中查找有关 Schedule Model Components 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!