Why does simulink recompiles the simulation every time when using sim command?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (2)
Andreas Goser
el 21 de Jun. de 2016
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 comentarios
omer
el 21 de Jun. de 2016
Editada: omer
el 21 de Jun. de 2016
2 comentarios
Andreas Goser
el 21 de Jun. de 2016
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.
Ver también
Categorías
Más información sobre Programmatic Model Editing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!