How do I stop simulink from creating large temp files?

22 ビュー (過去 30 日間)
Guy Squillace
Guy Squillace 2023 年 4 月 13 日
回答済み: Sara Nadeau 2023 年 4 月 13 日
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 件のコメント
Guy Squillace
Guy Squillace 2023 年 4 月 13 日
Edit: I am also looking for a solution that does not require closing Matlab.

サインインしてコメントする。

採用された回答

Sara Nadeau
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 件)

カテゴリ

Help Center および File ExchangeEvent Functions についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by