How do I increase simulation speed for Simulink models that have Embedded MATLAB Function blocks?
5 次查看(过去 30 天)
显示 更早的评论
My model has several Embedded MATLAB Function blocks. Is there a way to increase the simulation speed?
采纳的回答
MathWorks Support Team
2009-6-27
For simulation, the debug instrumentation will make Embedded MATLAB a bit slower. Turning off debugging will help the problem.
1. Start model explorer. From Simulink model windows, select "View" -> "Model Explorer".
2. Click on the model name. This should be right below "Configuration Preferences"
3. Click on the Contents window, scroll all the way to the bottom and select "sfun"
4. Click on the "Coder Options" button and uncheck "enable debugging/animation"
If you are using Simulink 6.3 (R14SP3) or later, you can also turn debugging on and off for individual Embedded MATLAB blocks using the Embedded MATLAB Editor. To do so, open the Embedded MATLAB Editor (by double-clicking on the block) and select the "Debug -> Enable Debugging" option to toggle the use of debugging. This option will be greyed out if debugging has been disabled for all Embedded MATLAB blocks using the method described above.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!