Why does simulink recompiles the simulation every time when using sim command?
3 ビュー (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154267/image.png)
Im trying to call to sim multiple times through a for loop. The only things that changes each iteration are the values of the plecs parameters blocks inside(the simulation input).
But every time i click the run button of the model it shows the recompilation process in a green box below(a picture is attached).
How can i do compilation only once and in the other times the simulation will just run with the new input ? The problem is that each compilation takes about two seconds and it a long time when using long for loops.
0 件のコメント
回答 (2 件)
Andreas Goser
2016 年 6 月 21 日
The "Plecs" keyword suggests there might be a non MathWorks product involved. Can you confirm? Can you try to remove that 3rd party block(s) for debugging purpose and see whether it still recompiles? This is to narrow down if a Simulink or a Plecs specialist is needed.
0 件のコメント
omer
2016 年 6 月 21 日
編集済み: omer
2016 年 6 月 21 日
2 件のコメント
Andreas Goser
2016 年 6 月 21 日
I see. When this green progress bar promts "compiling" it does very differnt things under the hood. Some of them may be actual "compiling", some not. So basically you point is how to speed that up. I really cannot say that for PLECS. Maybe there is a PLECS specific forum? Certainly also here on MATLAB Answers other users maybe have that experience.
参考
カテゴリ
Help Center および File Exchange で Programmatic Model Editing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!