Simulink progress from command line
显示 更早的评论
Hi. Does anyone know how I can assess Simulink simulation progress when the simulation is called from the command line or an .m file script? I'd rather not have a scope open (too slow) and the progress indicator in the Simulink window (assuming I have the model open) doesn't seem to update when the simulation is called from the command line.
Thanks in advance for any solutions or clues.
Andy
回答(1 个)
Kaustubha Govind
2011-10-6
1 个投票
I don't know of a public API that you can use to query the progress of simulation, but if you're familiar with C-MEX S-functions, it should be fairly simple to write a custom block that can report the progress based on the simulation StopTime (ssGetTFinal) and current simulation step (ssGetT).
You can use ssPrintf to print to console.
类别
在 帮助中心 和 File Exchange 中查找有关 Naming Conventions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!