sdi.Reposi​tory.clear​Repository​File never ends

5 次查看(过去 30 天)
I have some simulations that creates a lot of temporary files. I need to run several of them and the memory usage of the temporary .dmr file increases a lot. I have had situations with 50Gb of data saved in the temporary files.
I found that the running "sdi.Repository.clearRepositoryFile" solves the issue, the file is deleted. The problem is that the line of code may sometimes stop working and it would freeze matlab. So I have to kill it and open it again.
Does anyone knows what may be the issue with that line of code?

回答(1 个)

Harsh Sanghai
Harsh Sanghai 2023-3-23
Hi,
The "sdi.Repository.clearRepositoryFile" command is used to clear the repository file used by the Simulink Data Inspector (SDI). This command is intended to be used when the SDI has been closed but the repository file is still open, which can happen if MATLAB or Simulink crashes. However, it is not intended to be used to delete arbitrary temporary files created by your simulations.
To properly manage temporary files created by your simulations, it is recommended to use MATLAB's "tempdir" function to create a temporary directory and store your temporary files there. This directory will be automatically deleted when your MATLAB session ends, freeing up disk space.
You can also delete your temporary files manually by using "delete " function.

类别

Help CenterFile Exchange 中查找有关 Naming Conventions 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by