Running Simulink Model in for loop
8 次查看(过去 30 天)
显示 更早的评论
I'm trying to run a Simulink model within a for loop so I can vary the input parameters. I tried using the sim command but it takes a long time to compile each run which makes it impractical for generating a large amount of data. Is there any way to reduce the compiling speed or compile the simulation once before the for loop?
Any help is much appreciated. Thanks
0 个评论
采纳的回答
Madhu Govindarajan
2018-10-2
I think overall the concept of Model referencing might be of value to you (https://www.mathworks.com/help/simulink/model-reference.html). I say this because, when you reference a model you can set not to recompile this model as long as nothing inside it has changed. Then you would use that setting to not include any of your varying parameters and you do not have to recompile. The catch though would be if you are changing something at the core of your algorithm, then you might be forced to recompile every time.
Just my 2c, Madhu
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Environment Customization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!