How do I stop simulink from creating large temp files?

23 visualizaciones (últimos 30 días)
Guy Squillace
Guy Squillace el 13 de Abr. de 2023
Respondida: Sara Nadeau el 13 de Abr. de 2023
I am using Matlab 2022a. I have a simulation that runs a simulink model in a for loop. After each loop iteration, I output data from the simulink model to the workspace and save it in a .mat file. The next iteration overwrites the workspace and is saved in a separate .mat file. However, Matlab is creating very large DMR files with the naming convention xxxx-xxxx-xxxx-xxxx.dmr (xxxx is a hexidecimal value). There is also a large file called jetstream.dmr. These files are >1GB in size, and sometimes upward of 10GB. This is a problem since they are not being removed and fill my disk space. Is there a way to stop them from being generated or a way to clear them every time my model runs?
  1 comentario
Guy Squillace
Guy Squillace el 13 de Abr. de 2023
Edit: I am also looking for a solution that does not require closing Matlab.

Iniciar sesión para comentar.

Respuesta aceptada

Sara Nadeau
Sara Nadeau el 13 de Abr. de 2023
The DMR files might be related to logging. By default, most logged data logs to the Simulation Data Inspector, which retains simulation data for multiple runs so you can analyze it all together.
Running Simulink.sdi.clear after you save the MAT file will clear the data for that run.
You can also configure settings in the Simulation Data Inspector to control how much data is retained.
Here's some information about the options you have: https://www.mathworks.com/help/simulink/ug/limit-size-of-logged-data.html
Here's an example that shows how to disable the retention of data in the Simulation Data Inspector programmatically: https://www.mathworks.com/help/simulink/slref/simulink.sdi.setautoarchivemode.html
I am not sure whether this covers everything that you're seeing, but I hope it helps!

Más respuestas (0)

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by