Info
此问题已关闭。 请重新打开它进行编辑或回答。
Unable to open some mfiles. Matlab thinks the mfile is alread open, but it isn't.
1 次查看(过去 30 天)
显示 更早的评论
I am running Matlab 2017b on Ubuntu 16.04. When I try to open some mfiles using the editor, the screen flickers like a window is going to open and then the 'window' shrinks down into the Matlab icon. I have opened these files before without any issues and I can look at the files using other editors/text dumps.
I can copy the file using the command line to another directory and then open it, but can not save it back to the original directory. If I try to save it in the original directory I get the following message:
Select File for Save As
filename.m already exists. Do you want to replace it? [yes]
then after clicking yes I get the following error
MATLAB Editor
filename.m is already open in the MATLAB Editor. To overwrite the file, close the original first.
The problem is the original is not open. I can look at the mfile using other software. Is there any way to to convince the editor that the file is not open?
Thank you for any help with this problem.
1 个评论
Bob Thompson
2018-3-29
编辑:Bob Thompson
2018-3-29
It is likely that the files get called up by some script but are not properly closed by the script. The files don't appear open, but MATLAB still has them considered to be opened. This happens a lot with commands like fopen.
Sometimes fclose(all) will work to fix this, otherwise, my suggestion is just to close and reopen MATLAB. This will close all windows and files it has open.
回答(1 个)
此问题已关闭。
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!