Conflict of writing and reading .mat file
2 次查看(过去 30 天)
显示 更早的评论
My code needs to read a mat file for several times, but the file will be updated by another programs. How to avoid conflict if it is reading when file is updated ?
0 个评论
回答(1 个)
Walter Roberson
2015-10-10
If you have the cooperation of the other program then this can be fairly simple. If you do not have the cooperation of the other program than this can be difficult and may require enhanced access permissions to the operating system table of open files.
There are mechanisms that are not so bad that can notify you when a file is being changed, but the mechanisms to tell you when all other processes have closed the file are lacking.
The details are going to depend upon the operating system you are using.
If you can get the cooperation of the other program then you are much much better off.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!