Running Simulink Model in for loop

4 visualizaciones (últimos 30 días)
DrewVZ
DrewVZ el 2 de Oct. de 2018
Editada: DrewVZ el 5 de Oct. de 2018
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

Respuesta aceptada

Madhu Govindarajan
Madhu Govindarajan el 2 de Oct. de 2018
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

Más respuestas (0)

Categorías

Más información sobre Simulink Environment Customization en Help Center y File Exchange.

Productos


Versión

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by