How do I stop simulink from creating large temp files?
21 次查看(过去 30 天)
显示 更早的评论
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?
采纳的回答
Sara Nadeau
2023-4-13
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!
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!