Locked Folder after reading text files

3 ビュー (過去 30 日間)
luis fonseca
luis fonseca 2020 年 10 月 5 日
コメント済み: Walter Roberson 2020 年 10 月 5 日
Hi all
I use a software called Thermal Desktop that performs thermal simulations. This software ouputs multiple files regarding the temperature of the object designed. I made a matlab program that reads and plots the temperature data. However, I shared my matlab program to multiple teammates but one is getting the following problem
  • My colleage is able to read the data in matlab to check the results after the thermal simulation finishes
  • However, it appears that the directory, or perhaps some of the files inside of it, gets locked by matlab. When he tries to run the model again, Thermal Desktop is unable to write or overwrite the results to the same location, so it creates a new directory name.
This never happens to other colleagues or to me and I am trying to figure out differences since I will be sharing my code to more people and that problem might pop up to others. Is this a matlab problem or something else. Could it be because my colleague's folder drive is mapped to the network. We are all are using Matlab 2019a.
I read the files with fopen functions and the default permission is read only, afterwards I used fclose as it should be.
Cheers
Diego
  3 件のコメント
Mario Malic
Mario Malic 2020 年 10 月 5 日
Verify if the files have been properly closed by
status = fclose(fid)
if status == -1
disp('error at this file');
end
If you get no errors, then the error is most likely on not on MATLAB side.
When that error happens, tell your colleague to try to delete the model file, you'll get an information which program doesn't allow its deletion.
Walter Roberson
Walter Roberson 2020 年 10 月 5 日
IIRC the problem with Microsoft Onedrive was active in R2019a, and had to do with the synchronize file setting.
I have seen other posts mentioning Onedrive problems, especially having to do with time synchronization, where MATLAB would keep thinking that the network version of the file was newer and had to be read back in.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by